Hi
all,
I
have a multi-language website, which I use the FCK Editor for, because the FCK
Editor has several dictionaries and I have a multi-language spellchecker for FCK
I have amended the xforms.js to look for a USER_LANGUAGE variable and (if it
exists) set the language of the FCK Editors to this, otherwise use 'en'. I have
also added a custom configuration path variable (FCK_CUSTOM_CONFIG) when this
exist it overrides the current config
Would it be possible
to commit this code so everyone can make use of it? (I've copied the _htmlArea
function code below
Thanks
Ryan
/** * Initialize HTML areas. */ _htmlArea: function (htmlArea) { var fckEditor = new FCKeditor(htmlArea.name); if (!xformsArrayContains(ORBEON.xforms.Globals.htmlAreaNames, htmlArea.name)) ORBEON.xforms.Globals.htmlAreaNames.push(htmlArea.name); fckEditor.BasePath = BASE_URL + "/ops/fckeditor/"; fckEditor.ToolbarSet = "OPS"; // TFX CODE - Code for changing the language in the FCK Editor and the application of a spellchecker var type_check = typeof USER_LANGUAGE if (type_check != 'undefined') { fckEditor.Config["AutoDetectLanguage"] = false; fckEditor.Config["DefaultLanguage"] = (USER_LANGUAGE != '') ? USER_LANGUAGE : 'en'; } type_check = typeof FCK_CUSTOM_CONFIG if (type_check != 'undefined') fckEditor.Config["CustomConfigurationsPath"] = FCK_CUSTOM_CONFIG; // TFX CODE - End if (ORBEON.xforms.Globals.fckEditorLoading) { ORBEON.xforms.Globals.fckEditorsToLoad.push(fckEditor); } else { ORBEON.xforms.Globals.fckEditorLoading = true; fckEditor.ReplaceTextarea(); ORBEON.xforms.Controls.updateHTMLAreaClasses(document.getElementById(fckEditor.InstanceName)); } }, Ryan
Puddephatt -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Ryan,
It makes sense to add a parameters for the user language. I just would like to make this consistent with the other parameters. Right now we have at the beginning of xforms.js those parameters, which some people might want to change: var XFORMS_DELAY_BEFORE_INCREMENTAL_REQUEST_IN_MS = 500; var XFORMS_DELAY_BEFORE_FORCE_INCREMENTAL_REQUEST_IN_MS = 2000; var XFORMS_DELAY_BEFORE_ANY_REQUEST_IN_MS = 10; var XFORMS_DELAY_BEFORE_DISPLAY_LOADING_IN_MS = 500; var XFORMS_DEBUG_WINDOW_HEIGHT = 600; var XFORMS_DEBUG_WINDOW_WIDTH = 300; There is really no way to change the value of those parameters now, other than editing the xforms.js. Instead of initializing those when xforms.js is loaded, we could do it in ORBEON.xforms.Init.document(), which is called when the page is loaded. This will give you a chance to set the value of any of those parameters in a <script> in your page. If you do sofor any parameter, then ORBEON.xforms.Init.document() won't change the value you set for that parameter. Otherwise it will set it to a default value. We could do the same for USER_LANGUAGE, which would be called XFORMS_USER_LANGUAGE for consistency. Does that sound like a plan? Alex On 11/22/06, Ryan Puddephatt <[hidden email]> wrote: > > > Hi all, > I have a multi-language website, which I use the FCK Editor for, because the FCK Editor has several dictionaries and I have a multi-language spellchecker for FCK I have amended the xforms.js to look for a USER_LANGUAGE variable and (if it exists) set the language of the FCK Editors to this, otherwise use 'en'. I have also added a custom configuration path variable (FCK_CUSTOM_CONFIG) when this exist it overrides the current config > > Would it be possible to commit this code so everyone can make use of it? (I've copied the _htmlArea function code below > > Thanks > > Ryan > > > > /** > > * Initialize HTML areas. > > */ > > _htmlArea: function (htmlArea) { > > var fckEditor = new FCKeditor(htmlArea.name); > > if (!xformsArrayContains(ORBEON.xforms.Globals.htmlAreaNames, htmlArea.name)) > > ORBEON.xforms.Globals.htmlAreaNames.push(htmlArea.name); > > fckEditor.BasePath = BASE_URL + "/ops/fckeditor/"; > > fckEditor.ToolbarSet = "OPS"; > > > > // TFX CODE - Code for changing the language in the FCK Editor and the application of a spellchecker > > var type_check = typeof USER_LANGUAGE > > if (type_check != 'undefined') { > > fckEditor.Config["AutoDetectLanguage"] = false; > > fckEditor.Config["DefaultLanguage"] = (USER_LANGUAGE != '') ? USER_LANGUAGE : 'en'; > > } > > type_check = typeof FCK_CUSTOM_CONFIG > > if (type_check != 'undefined') > > fckEditor.Config["CustomConfigurationsPath"] = FCK_CUSTOM_CONFIG; > > // TFX CODE - End > > > > if (ORBEON.xforms.Globals.fckEditorLoading) { > > ORBEON.xforms.Globals.fckEditorsToLoad.push(fckEditor); > > } else { > > ORBEON.xforms.Globals.fckEditorLoading = true; > > fckEditor.ReplaceTextarea(); > > ORBEON.xforms.Controls.updateHTMLAreaClasses(document.getElementById(fckEditor.InstanceName)); > > } > > }, > > > > > > Ryan Puddephatt > Software Engineer > > > Teleflex Group - IT UK > 1 Michaelson Square > Livingston > West Lothian > Scotland > EH54 7DP > > e> [hidden email] > t> +44(0)1506 407 110 > f> +44(0)1506 407 108 > w> www.teleflex.com > > > -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
With the code as structured now, could not a user's custom script change the value of these global variables after they've been initialized already in xforms.js? Do you really need to move these into an init() function and test for an existing instance before setting the default?
On 11/28/06, Alessandro Vernet <[hidden email]> wrote:
Ryan, -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
In reply to this post by Alessandro Vernet
Sounds like a good plan
Thanks Alex Ryan Ryan Puddephatt Software Engineer Teleflex Group - IT UK 1 Michaelson Square Livingston West Lothian Scotland EH54 7DP e> [hidden email] t> +44(0)1506 407 110 f> +44(0)1506 407 108 >-----Original Message----- >From: [hidden email] [mailto:[hidden email]] On Behalf >Of Alessandro Vernet >Sent: 28 November 2006 21:32 >To: [hidden email] >Subject: Re: [ops-users] Proposed Xforms.js change > >Ryan, > >It makes sense to add a parameters for the user language. I >just would like to make this consistent with the other >parameters. Right now we have at the beginning of xforms.js >those parameters, which some people might want to change: > >var XFORMS_DELAY_BEFORE_INCREMENTAL_REQUEST_IN_MS = 500; var >XFORMS_DELAY_BEFORE_FORCE_INCREMENTAL_REQUEST_IN_MS = 2000; >var XFORMS_DELAY_BEFORE_ANY_REQUEST_IN_MS = 10; var >XFORMS_DELAY_BEFORE_DISPLAY_LOADING_IN_MS = 500; var >XFORMS_DEBUG_WINDOW_HEIGHT = 600; var XFORMS_DEBUG_WINDOW_WIDTH = 300; > >There is really no way to change the value of those parameters >now, other than editing the xforms.js. Instead of initializing >those when xforms.js is loaded, we could do it in >ORBEON.xforms.Init.document(), which is called when the page >is loaded. This will give you a chance to set the value of any >of those parameters in a <script> in your page. If you do >sofor any parameter, then >ORBEON.xforms.Init.document() won't change the value you set >for that parameter. Otherwise it will set it to a default value. > >We could do the same for USER_LANGUAGE, which would be called >XFORMS_USER_LANGUAGE for consistency. > >Does that sound like a plan? > >Alex > >On 11/22/06, Ryan Puddephatt <[hidden email]> wrote: >> >> >> Hi all, >> I have a multi-language website, which I use the FCK >Editor for, >> because the FCK Editor has several dictionaries and I have a >> multi-language spellchecker for FCK I have amended the xforms.js to >> look for a USER_LANGUAGE variable and (if it exists) set >the language >> of the FCK Editors to this, otherwise use 'en'. I have also added a >> custom configuration path variable (FCK_CUSTOM_CONFIG) when this >> exist it overrides the current config >> >> Would it be possible to commit this code so everyone can >make use of >> it? (I've copied the _htmlArea function code below >> >> Thanks >> >> Ryan >> >> >> >> /** >> >> * Initialize HTML areas. >> >> */ >> >> _htmlArea: function (htmlArea) { >> >> var fckEditor = new FCKeditor(htmlArea.name); >> >> if (!xformsArrayContains(ORBEON.xforms.Globals.htmlAreaNames, >> htmlArea.name)) >> >> ORBEON.xforms.Globals.htmlAreaNames.push(htmlArea.name); >> >> fckEditor.BasePath = BASE_URL + "/ops/fckeditor/"; >> >> fckEditor.ToolbarSet = "OPS"; >> >> >> >> // TFX CODE - Code for changing the language in the FCK Editor and >> the application of a spellchecker >> >> var type_check = typeof USER_LANGUAGE >> >> if (type_check != 'undefined') { >> >> fckEditor.Config["AutoDetectLanguage"] = false; >> >> fckEditor.Config["DefaultLanguage"] = (USER_LANGUAGE != '') ? >> USER_LANGUAGE : 'en'; >> >> } >> >> type_check = typeof FCK_CUSTOM_CONFIG >> >> if (type_check != 'undefined') >> >> fckEditor.Config["CustomConfigurationsPath"] = FCK_CUSTOM_CONFIG; >> >> // TFX CODE - End >> >> >> >> if (ORBEON.xforms.Globals.fckEditorLoading) { >> >> ORBEON.xforms.Globals.fckEditorsToLoad.push(fckEditor); >> >> } else { >> >> ORBEON.xforms.Globals.fckEditorLoading = true; >> >> fckEditor.ReplaceTextarea(); >> >> >ORBEON.xforms.Controls.updateHTMLAreaClasses(document.getElementById(f >> ckEditor.InstanceName)); >> >> } >> >> }, >> >> >> >> >> >> Ryan Puddephatt >> Software Engineer >> >> >> Teleflex Group - IT UK >> 1 Michaelson Square >> Livingston >> West Lothian >> Scotland >> EH54 7DP >> >> e> [hidden email] >> t> +44(0)1506 407 110 >> f> +44(0)1506 407 108 >> w> www.teleflex.com >> >> >> > > > >-- >Blog (XML, Web apps, Open Source): >http://www.orbeon.com/blog/ > > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
In reply to this post by ToddG
Todd,
The way it is right now, you can't set the value of those variables before xforms.js is loaded, otherwise when it loads your values are overwritten. You can set the values after xforms.js is loaded, but that is likely to be after the "load" handler in xforms.js is called, and it will have already picked up the value of the variables before you got a chance to change them. Setting the default value for those variables in ORBEON.xforms.Init.document() is one way of solving this problem. Alex On 11/28/06, Todd Gochenour <[hidden email]> wrote: > With the code as structured now, could not a user's custom script change the > value of these global variables after they've been initialized already in > xforms.js? Do you really need to move these into an init() function and > test for an existing instance before setting the default? > > > On 11/28/06, Alessandro Vernet <[hidden email]> wrote: > > > > Ryan, > > > > It makes sense to add a parameters for the user language. I just would > > like to make this consistent with the other parameters. Right now we > > have at the beginning of xforms.js those parameters, which some people > > might want to change: > > > > var XFORMS_DELAY_BEFORE_INCREMENTAL_REQUEST_IN_MS = 500; > > var XFORMS_DELAY_BEFORE_FORCE_INCREMENTAL_REQUEST_IN_MS = > 2000; > > var XFORMS_DELAY_BEFORE_ANY_REQUEST_IN_MS = 10; > > var XFORMS_DELAY_BEFORE_DISPLAY_LOADING_IN_MS = 500; > > var XFORMS_DEBUG_WINDOW_HEIGHT = 600; > > var XFORMS_DEBUG_WINDOW_WIDTH = 300; > > > > There is really no way to change the value of those parameters now, > > other than editing the xforms.js. Instead of initializing those when > > xforms.js is loaded, we could do it in ORBEON.xforms.Init.document(), > > which is called when the page is loaded. This will give you a chance > > to set the value of any of those parameters in a <script> in your > > page. If you do sofor any parameter, then > > ORBEON.xforms.Init.document() won't change the value you set for that > > parameter. Otherwise it will set it to a default value. > > > > We could do the same for USER_LANGUAGE, which would be called > > XFORMS_USER_LANGUAGE for consistency. > > > > Does that sound like a plan? > > > > Alex > > > > On 11/22/06, Ryan Puddephatt < [hidden email]> wrote: > > > > > > > > > Hi all, > > > I have a multi-language website, which I use the FCK Editor for, > because the FCK Editor has several dictionaries and I have a multi-language > spellchecker for FCK I have amended the xforms.js to look for a > USER_LANGUAGE variable and (if it exists) set the language of the FCK > Editors to this, otherwise use 'en'. I have also added a custom > configuration path variable (FCK_CUSTOM_CONFIG) when this exist it > overrides the current config > > > > > > Would it be possible to commit this code so everyone can make use of > it? (I've copied the _htmlArea function code below > > > > > > Thanks > > > > > > Ryan > > > > > > > > > > > > /** > > > > > > * Initialize HTML areas. > > > > > > */ > > > > > > _htmlArea: function (htmlArea) { > > > > > > var fckEditor = new FCKeditor(htmlArea.name); > > > > > > if > (!xformsArrayContains(ORBEON.xforms.Globals.htmlAreaNames , > htmlArea.name)) > > > > > > > ORBEON.xforms.Globals.htmlAreaNames.push(htmlArea.name); > > > > > > fckEditor.BasePath = BASE_URL + "/ops/fckeditor/"; > > > > > > fckEditor.ToolbarSet = "OPS"; > > > > > > > > > > > > // TFX CODE - Code for changing the language in the FCK Editor and the > application of a spellchecker > > > > > > var type_check = typeof USER_LANGUAGE > > > > > > if (type_check != 'undefined') { > > > > > > fckEditor.Config["AutoDetectLanguage"] = false; > > > > > > fckEditor.Config["DefaultLanguage"] = (USER_LANGUAGE != '') ? > USER_LANGUAGE : 'en'; > > > > > > } > > > > > > type_check = typeof FCK_CUSTOM_CONFIG > > > > > > if (type_check != 'undefined') > > > > > > fckEditor.Config["CustomConfigurationsPath"] = FCK_CUSTOM_CONFIG; > > > > > > // TFX CODE - End > > > > > > > > > > > > if (ORBEON.xforms.Globals.fckEditorLoading ) { > > > > > > ORBEON.xforms.Globals.fckEditorsToLoad.push(fckEditor); > > > > > > } else { > > > > > > ORBEON.xforms.Globals.fckEditorLoading = true; > > > > > > fckEditor.ReplaceTextarea(); > > > > > > > ORBEON.xforms.Controls.updateHTMLAreaClasses(document.getElementById(fckEditor.InstanceName)); > > > > > > } > > > > > > }, > > > > > > > > > > > > > > > > > > Ryan Puddephatt > > > Software Engineer > > > > > > > > > Teleflex Group - IT UK > > > 1 Michaelson Square > > > Livingston > > > West Lothian > > > Scotland > > > EH54 7DP > > > > > > e> [hidden email] > > > t> +44(0)1506 407 110 > > > f> +44(0)1506 407 108 > > > w> www.teleflex.com > > > > > > > > > > > > > > > > > -- > > Blog (XML, Web apps, Open Source): > > http://www.orbeon.com/blog/ > > > > > > > > > > -- > > You receive this message as a subscriber of the [hidden email] > mailing list. > > To unsubscribe: > mailto:[hidden email] > > For general help: mailto:[hidden email]?subject=help > > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > > > > > > > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
I quickly traced the code in a JS debugger. I found this code:
// Run xformsPageLoaded when the browser has finished loading the page
// In case this script is loaded twice, we still want to run the initialization only once if (!ORBEON.xforms.Globals.pageLoadedRegistered) { ORBEON.xforms.Globals.pageLoadedRegistered = true; YAHOO.util.Event.addListener(window, "load", ORBEON.xforms.Init.document); } This is how I hoped it would be. This tells me the Init.document() function isn't called till the page has completely loaded. Any global inline custom javascript I have (including the resetting of these global variables) will execute during the page load and before this function is called. I think it should work. But I can understand that it isn't guarenteed safe as these globals could be used within inline javascript that isn't executed on the page's onload() function. Moving this code into
Init.document() function will provide this guarentee.
As an aside, the declaration of the Init object with the document function is done in a way that prevents me setting a breakpoint or tracing into the code. I'm curious why this was done this way rather than as a normal javascript object.
Todd
On 11/29/06, Alessandro Vernet <[hidden email]> wrote:
Todd, -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Todd,
On 11/29/06, Todd Gochenour <[hidden email]> wrote: > This is how I hoped it would be. This tells me the Init.document() function > isn't called till the page has completely loaded. Any global inline custom > javascript I have (including the resetting of these global variables) will > execute during the page load and before this function is called. I think it > should work. But I can understand that it isn't guarenteed safe as these > globals could be used within inline javascript that isn't executed on the > page's onload() function. Moving this code into Init.document() function > will provide this guarentee. My point was a little different: if you set the value of one of those variable before the page loads (say in a <script> located in the HTML page), you don't know if that code will run before or after xforms.js is loaded. It it runs before, then the value you set will get overwritten when xforms.js is loaded by the browser (all of this happening before the "load" event is dispatched). Does this make sense? > As an aside, the declaration of the Init object with the document function > is done in a way that prevents me setting a breakpoint or tracing into the > code. I'm curious why this was done this way rather than as a normal > javascript object. You mean that because of the way ORBEON.xforms.Init.document() is declared, you cannot put a breakpoint in the code of document()? What debugger are you using? Alex -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
I get your point.
Debugger: MS Visual Studio
Clicking on any line in the definition of the init object causes the break to be set on the whole block, that is to say, the break is on the initialization and not the invocation. I was unable in test whether I could step into this code as I stopped tracing before the
init.document() function was invoked. I suspect that the debugger would have problems tracing into this code.
On 11/30/06, Alessandro Vernet <[hidden email]> wrote:
Todd, -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Todd,
OK, that looks like a bug in Visual Studio. I am following the convention that was used at some point by the Yahoo! UI Library. Right now they seem to do: YAHOO.util.Dom = function() { var toCamel = function(property) { ... If you change code in xforms.js to use that convention instead, can you debug it in Visual Studio? Alex On 11/30/06, Todd Gochenour <[hidden email]> wrote: > I get your point. > > Debugger: MS Visual Studio > > Clicking on any line in the definition of the init object causes the break > to be set on the whole block, that is to say, the break is on the > initialization and not the invocation. I was unable in test whether I could > step into this code as I stopped tracing before the init.document() function > was invoked. I suspect that the debugger would have problems tracing into > this code. > > > On 11/30/06, Alessandro Vernet <[hidden email]> wrote: > > > > Todd, > > > > On 11/29/06, Todd Gochenour <[hidden email] > wrote: > > > This is how I hoped it would be. This tells me the Init.document() > function > > > isn't called till the page has completely loaded. Any global inline > custom > > > javascript I have (including the resetting of these global variables) > will > > > execute during the page load and before this function is called. I > think it > > > should work. But I can understand that it isn't guarenteed safe as > these > > > globals could be used within inline javascript that isn't executed on > the > > > page's onload() function. Moving this code into Init.document() > function > > > will provide this guarentee. > > > > My point was a little different: if you set the value of one of those > > variable before the page loads (say in a <script> located in the HTML > > page), you don't know if that code will run before or after xforms.js > > is loaded. It it runs before, then the value you set will get > > overwritten when xforms.js is loaded by the browser (all of this > > happening before the "load" event is dispatched). Does this make > > sense? > > > > > As an aside, the declaration of the Init object with the document > function > > > is done in a way that prevents me setting a breakpoint or tracing into > the > > > code. I'm curious why this was done this way rather than as a normal > > > javascript object. > > > > You mean that because of the way ORBEON.xforms.Init.document() is > > declared, you cannot put a breakpoint in the code of document()? What > > debugger are you using? > > > > Alex > > -- > > Blog (XML, Web apps, Open Source): > > http://www.orbeon.com/blog/ > > > > > > > > > > -- > > You receive this message as a subscriber of the [hidden email] > mailing list. > > To unsubscribe: > mailto:[hidden email] > > For general help: mailto: [hidden email]?subject=help > > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > > > > > > > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
OK. I misspoke. I CAN set a breakpoint on code within an objects function given this syntax. I'm not sure what I was clicking on to make it select the initialization code for the breakpoint. Sorry for the red herring.
Todd
On 11/30/06, Alessandro Vernet <[hidden email]> wrote:
Todd, -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Todd,
OK, so I guess we'll keep the structure of the JavaScript code as it is. Alex On 11/30/06, Todd Gochenour <[hidden email]> wrote: > OK. I misspoke. I CAN set a breakpoint on code within an objects function > given this syntax. I'm not sure what I was clicking on to make it select > the initialization code for the breakpoint. Sorry for the red herring. > > Todd > > > > On 11/30/06, Alessandro Vernet <[hidden email]> wrote: > > Todd, > > . > > OK, that looks like a bug in Visual Studio. I am following the > > convention that was used at some point by the Yahoo! UI Library. Right > > now they seem to do: > > > > YAHOO.util.Dom = function() { > > var toCamel = function(property) { > > ... > > > > If you change code in xforms.js to use that convention instead, can > > you debug it in Visual Studio? > > > > Alex > > > > On 11/30/06, Todd Gochenour <[hidden email]> wrote: > > > I get your point. > > > > > > Debugger: MS Visual Studio > > > > > > Clicking on any line in the definition of the init object causes the > break > > > to be set on the whole block, that is to say, the break is on the > > > initialization and not the invocation. I was unable in test whether I > could > > > step into this code as I stopped tracing before the init.document () > function > > > was invoked. I suspect that the debugger would have problems tracing > into > > > this code. > > > > > > > > > On 11/30/06, Alessandro Vernet <[hidden email] > wrote: > > > > > > > > Todd, > > > > > > > > On 11/29/06, Todd Gochenour <[hidden email] > wrote: > > > > > This is how I hoped it would be. This tells me the Init.document() > > > function > > > > > isn't called till the page has completely loaded. Any global inline > > > custom > > > > > javascript I have (including the resetting of these global > variables) > > > will > > > > > execute during the page load and before this function is called. I > > > think it > > > > > should work. But I can understand that it isn't guarenteed safe as > > > these > > > > > globals could be used within inline javascript that isn't executed > on > > > the > > > > > page's onload() function. Moving this code into Init.document() > > > function > > > > > will provide this guarentee. > > > > > > > > My point was a little different: if you set the value of one of those > > > > variable before the page loads (say in a <script> located in the HTML > > > > page), you don't know if that code will run before or after xforms.js > > > > is loaded. It it runs before, then the value you set will get > > > > overwritten when xforms.js is loaded by the browser (all of this > > > > happening before the "load" event is dispatched). Does this make > > > > sense? > > > > > > > > > As an aside, the declaration of the Init object with the document > > > function > > > > > is done in a way that prevents me setting a breakpoint or tracing > into > > > the > > > > > code. I'm curious why this was done this way rather than as a > normal > > > > > javascript object. > > > > > > > > You mean that because of the way ORBEON.xforms.Init.document() is > > > > declared, you cannot put a breakpoint in the code of document()? What > > > > debugger are you using? > > > > > > > > Alex > > > > -- > > > > Blog (XML, Web apps, Open Source): > > > > http://www.orbeon.com/blog/ > > > > > > > > > > > > > > > > > > > > -- > > > > You receive this message as a subscriber of the > [hidden email] > > > mailing list. > > > > To unsubscribe: > > > mailto: [hidden email] > > > > For general help: mailto: > [hidden email]?subject=help > > > > ObjectWeb mailing lists service home page: > http://www.objectweb.org/wws > > > > > > > > > > > > > > > > > > > > > > > > -- > > > You receive this message as a subscriber of the [hidden email] > > > mailing list. > > > To unsubscribe: > mailto:[hidden email] > > > For general help: mailto: [hidden email]?subject=help > > > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > > > > > > > > > > > > > -- > > Blog (XML, Web apps, Open Source): > > http://www.orbeon.com/blog/ > > > > > > > > > > -- > > You receive this message as a subscriber of the [hidden email] > mailing list. > > To unsubscribe: > mailto:[hidden email] > > For general help: mailto:[hidden email]?subject=help > > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > > > > > > > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Is there a way of preserving character entities? For example, in the
form someone inputs a code snippet: <xs:notation name="gif" public="image/gif" system="view.exe."/> on submission the < and > gets converted to < and >. Also, is there a way of going to the opposite direction that if special characters are entered by the user to transform them into the proper UNICODE character? Thanks. Betty /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ Betty Harvey | Phone: 410-787-9200 FAX: 9830 Electronic Commerce Connection, Inc. | [hidden email] | Washington,DC XML Users Grp URL: http://www.eccnet.com | http://www.eccnet.com/xmlug /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Betty,
> Is there a way of preserving character entities? For example, in the > form someone inputs a code snippet: > > <xs:notation name="gif" public="image/gif" system="view.exe."/> Where is that string entered? If in an input field, then the content is text so all the characters should be preserved. > on submission the < and > gets converted to < and >. > Also, is there a way of going to the opposite direction that if > special characters are entered by the user to transform them into > the proper UNICODE character? Again, do you mean in an input field? -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |