[qooxdoo-devel] mouse wheel bugs

2006-03-16 Thread BJörn Lindqvist
I found this thread [1] about the mouse wheel and the QxComboBox. The
mouse wheel works perfectly in both Firefox 1.0.7 and Epiphany 1.8.2
on Ubuntu but is buggy in Galeon 1.3.2. You can't scroll unless you
first click on the scroll bar slider.

The mouse wheel on QxList's is buggy in Epiphany, Firefox and Galeon.
Unless you select the scrollbar slider, the mouse wheel unexpectedly
just stops working after you scroll down a few steps.

Mouse wheel on QxListView's doesn't seem to work at all. In Epiphany,
Firefox and Galeon, if you have an item selected in the list that item
will be scrolled instead of the QxListView itself. If nothing is
selected nothing scrolls at all and if the scroll bar slider is
selected it will be scrolled but the QxListView's contents wont
scroll.

On QxTree's and QxGalleryList's, the mouse wheel seem to work without
any problems on all three browsers.

I wonder what is causing this very different mouse wheel behaviour on
components that look similar? Is it minor oversights or unsolvable
problems due to browser quirks? Sorry if this seems like nitpicking,
but IMHO it is really important because Qooxdoo looks like a normal
desktop application so users expect it to behave like one and when it
don't, users become annoyed.

1. 
http://www.nabble.com/small-problem-with-Qooxdoo-combobox-implementation-t354822.html#a982041


--
mvh Björn


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
___
Qooxdoo-devel mailing list
Qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


Re: [qooxdoo-devel] mouse wheel bugs

2006-03-16 Thread Sebastian Werner
As I know this is because some versions of GTK, to which the Linux 
Versions of Gecko (Mozilla, Galeon, ...) are compiled with, doesn't 
correctly implement the mouse wheel event. So in my opinion this is a 
mozilla bug. And because this is only X11 (GTK) related this is not so 
problematic. Under windows it seems to work well.


Sebastian



BJörn Lindqvist schrieb:

I found this thread [1] about the mouse wheel and the QxComboBox. The
mouse wheel works perfectly in both Firefox 1.0.7 and Epiphany 1.8.2
on Ubuntu but is buggy in Galeon 1.3.2. You can't scroll unless you
first click on the scroll bar slider.

The mouse wheel on QxList's is buggy in Epiphany, Firefox and Galeon.
Unless you select the scrollbar slider, the mouse wheel unexpectedly
just stops working after you scroll down a few steps.

Mouse wheel on QxListView's doesn't seem to work at all. In Epiphany,
Firefox and Galeon, if you have an item selected in the list that item
will be scrolled instead of the QxListView itself. If nothing is
selected nothing scrolls at all and if the scroll bar slider is
selected it will be scrolled but the QxListView's contents wont
scroll.

On QxTree's and QxGalleryList's, the mouse wheel seem to work without
any problems on all three browsers.

I wonder what is causing this very different mouse wheel behaviour on
components that look similar? Is it minor oversights or unsolvable
problems due to browser quirks? Sorry if this seems like nitpicking,
but IMHO it is really important because Qooxdoo looks like a normal
desktop application so users expect it to behave like one and when it
don't, users become annoyed.

1. 
http://www.nabble.com/small-problem-with-Qooxdoo-combobox-implementation-t354822.html#a982041


--
mvh Björn


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642
___
Qooxdoo-devel mailing list
Qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel




---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Qooxdoo-devel mailing list
Qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


[qooxdoo-devel] rownum listview

2006-03-16 Thread Aleksandrs Saraks








Hi!

 

How can i get rownum of selected item in listview?

 

Aleksandrs

 








Re: [qooxdoo-devel] rownum listview

2006-03-16 Thread Petr Šimek
I do it this way:var pane=list.getPane();var it=pane.getSelectedItem();var pos=pane.getRelativeItemPosition(it);On 3/16/06, Aleksandrs Saraks
 <[EMAIL PROTECTED]> wrote:













Hi!

 

How can i get rownum of selected item in listview?

 

Aleksandrs

 







-- --- Petr Simek


[qooxdoo-devel] AJAX or Loading JavaScript to create Interface Components after PageLoad

2006-03-16 Thread Patrick W. Fraley

Hi,

I have a question about the posibillity to load Interfacegenartion Code 
after the page has been loaded.


I am trying to put tohether an application that is based on modules and 
each module has its own view.  The app is layed out by having a tree 
view on the left hand side, which contains all the modules and an 
"outputarea" on the right hand side.  Now when someone clicks on the 
module in the tree view, it should request the matching view from a 
perlscript which runs on the server.  this script returns JavaScript 
which then generates the view for the module in the "outputarea".


Now is this possible?  I would not like to include all code and js for 
each modules view in the main page, since this would make it very huge 
and very slow.


Thanks
Patrick

--
***
COMsulting Gerhard Faehling GmbH
Patrick W. Fraley
Oeverdieker Weg 6
23669 Timmendorfer Strand
Tel: 04503 / 7033-25
Fax: 04503 / 7033-13
E-Mail: [EMAIL PROTECTED]
Internet: www.comsulting.de
***




---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Qooxdoo-devel mailing list
Qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


[qooxdoo-devel] Re: AJAX or Loading JavaScript to create Interface Components after PageLoad

2006-03-16 Thread VoidMain
Patrick W. Fraley  comsulting.de> writes:

> ...
> Now is this possible?  I would not like to include all code and js for 
> each modules view in the main page, since this would make it very huge 
> and very slow.
> 
> Thanks
> Patrick
> 


Another solution would be to load just the Javascript u need encapsulated in 
functions dinamically from the server i use a function to do that, basically 
what i have is this:

This is the function wich loads the script at run time.
function LoadScript(url)
{
   var e = document.createElement("script");
   e.src = url;
   e.type="text/javascript";
   document.getElementsByTagName("head")[0].appendChild(e);
}


And then u can load a script like this:
//ShowLogin.js

ShowLogin = function()
{
var winLogin = new QxWindow("Login");
winLogin.set({resizeable : false, modal : true, width: 250, height: 
120, showMaximize : false, showMinimize : false, allowMaximize : false, 
allowMinimize : false, showClose : false, centered : true });
d.add(winLogin);

// Nick
var lbl1 = new QxAtom("Nick:");
lbl1.set({ left: 10, top: 5});
winLogin.add(lbl1);

var tbNick = new QxTextField;
tbNick.set({ left: 100, top: 5, width: 100, height: 14});
winLogin.add(tbNick);
// Ponemos el foco en el tb de nick
tbNick.addEventListener("appear", function(e) {
  this.focus();
});
// End Nick

// Pass
var lbl2 = new QxAtom("Password:");
lbl2.set({ left: 10, top: 35});
winLogin.add(lbl2);

var tbPass = new QxPasswordField;
tbPass.set({ left: 100, top: 35, width: 100, height: 14});
winLogin.add(tbPass);
// End Pass

// Login Button
var btnLogin = new QxButton("Login", "icons/16/button-ok.png");
btnLogin.setLocation(50, 70);
btnLogin.set({height: 24, width : 75});
winLogin.add(btnLogin);

btnLogin.addEventListener("execute", function(e) {
var name = tbNick.getValue();
var passTmp = tbPass.getValue();
var pass = hex_sha1(passTmp);
var resu = LoginUser( name, pass);
if(resu){
userConected = resu.Usuario[0];
winLogin.close();
winLogin = null;
UpdateMenu();
}
});
// End Login Button

// Cancel Button
var btnCancelar = new QxButton("Cancelar", "icons/16/button-
cancel.png");
btnCancelar.setLocation(130, 70);
btnCancelar.set({height: 24, width : 75});
winLogin.add(btnCancelar);

btnCancelar.addEventListener("execute", function(e) {
winLogin.close();
winLogin = null;
});
// End Cancel Button


winLogin.open();
}

LoginUser = function(nick, pass)
{
proxies.LoginService.func = null;
var ret = proxies.LoginService.UserLogin(nick, pass);
if(ret)
return eval('(' + ret + ')');
else
return null;
}

loginIncluded = true;
ShowLogin();

Note the call to ShowLogin(); at the end of the file i use this trick to get 
the function executed just after the script is loaded because with the dinamyc 
method of loading the browser doesn't wait until script is loaded so u cant put 
a call to the function after the call to load the script, i do that in thsi way:

...
case "Login":
if(!loginIncluded )
LoadScript("scripts/Login.js");
else
ShowLogin();
break;
...

In the first case when login is not included yet we simply call the LoadScript 
function and when the script has finnished loading the ShowLogin function is 
executed, in the second case we can simply call ShowLogin because the script is 
already loaded.

I hope this helps you.

VoidMain



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Qooxdoo-devel mailing list
Qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


Re: [qooxdoo-devel] Vote for jseclipse to support qooxdoo

2006-03-16 Thread Ben Alex

Sebastian Werner wrote:

JSEclipse is a great javascript editor plugin for Eclipse.


The creators of JSEclipse have now added Qooxdoo support to their 
plugin. This morning I received an email attachment containing the 
plugin (as I completed the survey mentioned by Sebastian). That's 
excellent responsiveness!


Cheers
Ben



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Qooxdoo-devel mailing list
Qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


[qooxdoo-devel] qooxdoo and jscalendar: the saga continues

2006-03-16 Thread Priebe, Jason
This message is for Steve Scargall (or any other jscalendar users):

I was wondering if you had worked more with jscalendar and qooxdoo.  I
thought that the integration was working well, but it turns out that
qooxdoo does not "see" the value that jscalendar puts into the
textfield.

The value is displayed properly, but if you try to retrieve the value
of the field via QxTextField.getValue(), you get a null value.

Any new info would be appreciated!

Jason Priebe
CBC New Media  


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
___
Qooxdoo-devel mailing list
Qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


RE: [qooxdoo-devel] qooxdoo and jscalendar: the saga continues

2006-03-16 Thread Priebe, Jason
I'll update my own request. 

A workaround is to get the value directly from the underlying INPUT
field.  To expand upon Steve's example code at

http://qooxdoo.oss.schlund.de/snippets/integrating-jscalendar

to get the date set by jscalendar, do this:

var xdate = document.getElementById("f_date_b").value;

this will not work:

var xdate = txtDate.getValue();

(forget about the fact that txtDate is a local var in Steve's example;
even if it were available to an event handler, the value would be null).

Hugh, you might want to add this to the document mentioned above.
Thanks!

Jason Priebe
CBC New Media 


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
___
Qooxdoo-devel mailing list
Qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


[qooxdoo-devel] code sample: get/set selected index for listview, combobox, treeview

2006-03-16 Thread Priebe, Jason
I hope these functions might help somebody.  Sometimes you want to
know the index of the selected item, or you might want to select the
n-th item in the list.

These functions work well with combobox and treeview.  They _should_
work with listview, too, since it uses a SelectionManager, but I have
not tested it.

/**
 * Gets the selected index for a combobox or treeview
 * returns -1 if nothing is selected.
 */
function getSelectedIndex (xwidget)
{
var mgr = xwidget.getManager();

if (mgr.getSelectedItem() == null)
{
return -1;
}

var items = mgr.getItems();
var i;
for (i = 0; i < items.length; i++)
{
if (items[i] == mgr.getSelectedItem())
{
return i;
}
}
return -1;
}


/**
 * Gets the selected item by index for a combobox or treeview
 * You can pass "-1" to deselect all items, and if you pass an
 * index that is larger than the number of items (minus 1), the
 * last item will be selected.
 */
function setSelectedIndex (xwidget, idx)
{
var mgr = xwidget.getManager();
if (idx < 0)
{
mgr.setSelectedItem (null);
return;
}

var items = mgr.getItems();
if (items.length == 0)
{
mgr.setSelectedItem (null);
return;
}

var selitem = null;
if (idx > items.length - 1)
{
idx = items.length - 1;
}

selitem = items[idx];
mgr.setSelectedItem (selitem);

// we need to set the value of a QxComboBox explicitly to change
// the value that is displayed.
if (xwidget.setValue != null)
{
xwidget.setValue(selitem.getLabel());
}
} 



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
___
Qooxdoo-devel mailing list
Qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


Re: [qooxdoo-devel] code sample: get/set selected index for listview, combobox, treeview

2006-03-16 Thread Kent Olsson
It looks good! Fast testing, ok.

Kent

On Thu, 2006-03-16 at 17:47 -0500, Priebe, Jason wrote:
> I hope these functions might help somebody.  Sometimes you want to
> know the index of the selected item, or you might want to select the
> n-th item in the list.
> 
> These functions work well with combobox and treeview.  They _should_
> work with listview, too, since it uses a SelectionManager, but I have
> not tested it.
> 
> /**
>  * Gets the selected index for a combobox or treeview
>  * returns -1 if nothing is selected.
>  */
> function getSelectedIndex (xwidget)
> {
> var mgr = xwidget.getManager();
> 
> if (mgr.getSelectedItem() == null)
> {
> return -1;
> }
> 
> var items = mgr.getItems();
> var i;
> for (i = 0; i < items.length; i++)
> {
> if (items[i] == mgr.getSelectedItem())
> {
> return i;
> }
> }
> return -1;
> }
> 
> 
> /**
>  * Gets the selected item by index for a combobox or treeview
>  * You can pass "-1" to deselect all items, and if you pass an
>  * index that is larger than the number of items (minus 1), the
>  * last item will be selected.
>  */
> function setSelectedIndex (xwidget, idx)
> {
> var mgr = xwidget.getManager();
> if (idx < 0)
> {
> mgr.setSelectedItem (null);
> return;
> }
> 
> var items = mgr.getItems();
> if (items.length == 0)
> {
> mgr.setSelectedItem (null);
> return;
> }
> 
> var selitem = null;
> if (idx > items.length - 1)
> {
> idx = items.length - 1;
> }
> 
> selitem = items[idx];
> mgr.setSelectedItem (selitem);
> 
> // we need to set the value of a QxComboBox explicitly to change
> // the value that is displayed.
> if (xwidget.setValue != null)
> {
> xwidget.setValue(selitem.getLabel());
> }
> } 
> 
> 
> 
> ---
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
> ___
> Qooxdoo-devel mailing list
> Qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Qooxdoo-devel mailing list
Qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


[qooxdoo-devel] Re: code sample: get/set selected index for listview, combobox, treeview

2006-03-16 Thread Jeronimo Milea

Hello Jason,


I hope these functions might help somebody.  Sometimes you want to
know the index of the selected item, or you might want to select the
n-th item in the list.

These functions work well with combobox and treeview.  They  should
work with listview, too, since it uses a SelectionManager, but I have
not tested it.

/**
* Gets the selected index for a combobox or treeview
* returns -1 if nothing is selected.
*/
function getSelectedIndex (xwidget)
{
var mgr = xwidget.getManager();
if (mgr.getSelectedItem() == null)
{
return -1;
}
var items = mgr.getItems();
var i;
for (i = 0; i < items.length; i++)
{
if (items[i] == mgr.getSelectedItem())
{
return i;
}
}
return -1;
}
/**
* Gets the selected item by index for a combobox or treeview
* You can pass "-1" to deselect all items, and if you pass an
* index that is larger than the number of items (minus 1), the
* last item will be selected.
*/
function setSelectedIndex (xwidget, idx)
{
var mgr = xwidget.getManager();
if (idx < 0)
{
mgr.setSelectedItem (null);
return;
}
var items = mgr.getItems();
if (items.length == 0)
{
mgr.setSelectedItem (null);
return;
}
var selitem = null;
if (idx > items.length - 1)
{
idx = items.length - 1;
}
selitem = items[idx];
mgr.setSelectedItem (selitem);
// we need to set the value of a QxComboBox explicitly to change
// the value that is displayed.
if (xwidget.setValue != null)
{
xwidget.setValue(selitem.getLabel());
}
}



Hi, it looks good indeed but for some reason it doesnt work for me it allways 
came up with an empty list whe executes mgr.getItems(); so i have changed 
the code a lill bit to reflect the beahavior in the examples...


This is my code to do the same and i added a function to set the selected 
item by value:


/**
* Gets the selected item by index for a combobox or treeview
* You can pass "-1" to deselect all items, and if you pass an
* index that is larger than the number of items (minus 1), the
* last item will be selected.
*/
function setSelectedIndex (xwidget, idx)
{
   var mgr = xwidget.getList();
   if (idx < 0)
   {
   xwidget.setSelected(null);
   return;
   }

   var items = mgr.getChildren();
   if (items.length == 0)
   {
   xwidget.setSelected(null);
   return;
   }

   var selitem = null;
   if (idx > items.length - 1)
   {
   idx = items.length - 1;
   }

   selitem = items[idx];
   xwidget.setSelected (selitem);

   // we need to set the value of a QxComboBox explicitly to change
   // the value that is displayed.
   if (xwidget.setValue != null)
   {
   xwidget.setValue(selitem.getLabel());
   }
}

/**
* Selects an item by its value
*/
function setSelectedItemByValue(xwidget, value)
{

   var items = xwidget.getList().getChildren();
   if (items.length == 0)
   {
   xwidget.setSelected(null);
   return;
   }

   var selitem = null;

   for (var i = 0; i < items.length; i++)
   {
   if (items[i].getValue() == value)
   {
   selitem = items[i];
   xwidget.setSelected(selitem);
   // we need to set the value of a QxComboBox explicitly to change
   // the value that is displayed.
   if (xwidget.setValue != null)
   {
   xwidget.setValue(selitem.getLabel());
   }
   }
   }
}





---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Qooxdoo-devel mailing list
Qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel