Re: Sub-components woes

2012-11-15 Thread Amedeo Mantica
I had a similar trouble too.
Dynamic Elements works better when applicable

Sent from my iPhone

On 15/nov/2012, at 03:14, prob...@macti.ca wrote:

 
 
 Envoyé de mon iPhone
 
 Le 2012-11-14 à 21:00, Chuck Hill ch...@global-village.net a écrit :
 
 Does BuildManifest have a reset() method.
 
 Yes, I reset the variables that holds the values from the bindings in reset() 
 but I don't do anything for QtyForSynthManifestTransaction in reset()
 
 What is the stack trace when setQtyForSynthManifestTransaction is called 
 with a null value?
 
 
 On 2012-11-14, at 5:51 PM, Pascal Robert wrote:
 
 I think I still have to understand a couple of things about components. So 
 I have a component that display a table where each row is coming from a 
 WORepetition. Inside each row, I have a column that calls a stateless 
 sub-component:
 
 td class=manifest_column
wo:BuildManifest selectedProject=$selectedProject 
 spec=$childSpec.spec transactions=$~transactionsForSpec(childSpec.spec) 
 employee=$~employee rootTransaction=$rootTransaction /
 /td
 
 In BuildManifest, I have the following code:
 
 wo:loop list=$spec.parts item=$partItem
   wo:if condition=$spec.isLotInventory
   wo:str value=$partItem.serialNumber /  
   /wo:if
   wo:textfield value=$qtyForSynthManifestTransaction size=4 
 numberformat=# style=padding: 0px; margin: 0px; /
   wo:if condition=$spec.isLotInventory
   wo:AjaxSubmitButton updateContainerID=$spec.inventoryNumber 
 value=SM action=$~createSyntheticTransactionFromPart(partItem) / br /
   /wo:if
   wo:else
   wo:AjaxSubmitButton updateContainerID=$spec.inventoryNumber 
 value=SM action=$~createSyntheticTransactionFromSpec() /
 /wo:else
 /wo:loop
 
 qtyForSynthManifestTransaction is a Integer, with a setter and a getter in 
 BuildManifest.java. Now, if I submit the form, 
 setQtyForSynthManifestTransaction is called with the value that I 
 submitted, that's fine, but the setter is called a second time, and it sets 
 the value to null, so when createSyntheticTransactionFromSpec or 
 createSyntheticTransactionFromPart are finally called, the quantity is set 
 to null!
 
 I have put a breakpoint on the awake method in BuildManifest, and awake() 
 is called as many time as I have rows in my table. So for example, if I had 
 10 rows, BuildManifest is called 10 times. After the first awake, 
 setQtyForSynthManifestTransaction is called to the correct value, after 
 than awake() is called a couple of times and boum! 
 setQtyForSynthManifestTransaction is called with a null value!
 
 So what's the trick?
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
 
 This email sent to ch...@global-village.net
 
 -- 
 Chuck Hill Senior Consultant / VP Development
 
 Practical WebObjects - for developers who want to increase their overall 
 knowledge of WebObjects or who are trying to solve specific problems.
 http://www.global-village.net/gvc/practical_webobjects
 
 Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest 
 Growing Companies in B.C! 
 Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of 
 Canada’s Fastest-Growing Companies by PROFIT Magazine!
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/amedeomantica%40me.com
 
 This email sent to amedeomant...@me.com

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Sub-components woes

2012-11-15 Thread Pascal Robert

Le 2012-11-14 à 21:07, Johnny Miller jlmil...@kahalawai.com a écrit :

 I too have trouble with this stuff all the time...
 
 if it is a stateless components where does qtyForSynthManifestTransaction get 
 stored?

It's not stored anywhere except in the component, I use this variable in a 
method in the component and in the text field, and that's it.

  Do you have automatic binding turned off as well?

Yes. And I inherit from ERXStatelessComponent

 
 On Nov 14, 2012, at 3:51 PM, Pascal Robert prob...@macti.ca wrote:
 
 I think I still have to understand a couple of things about components. So I 
 have a component that display a table where each row is coming from a 
 WORepetition. Inside each row, I have a column that calls a stateless 
 sub-component:
 
 td class=manifest_column
   wo:BuildManifest selectedProject=$selectedProject 
 spec=$childSpec.spec transactions=$~transactionsForSpec(childSpec.spec) 
 employee=$~employee rootTransaction=$rootTransaction /
 /td
 
 In BuildManifest, I have the following code:
 
 wo:loop list=$spec.parts item=$partItem
  wo:if condition=$spec.isLotInventory
  wo:str value=$partItem.serialNumber /  
  /wo:if
  wo:textfield value=$qtyForSynthManifestTransaction size=4 
 numberformat=# style=padding: 0px; margin: 0px; /
  wo:if condition=$spec.isLotInventory
  wo:AjaxSubmitButton updateContainerID=$spec.inventoryNumber 
 value=SM action=$~createSyntheticTransactionFromPart(partItem) / br /
  /wo:if
  wo:else
  wo:AjaxSubmitButton updateContainerID=$spec.inventoryNumber 
 value=SM action=$~createSyntheticTransactionFromSpec() /
 /wo:else
 /wo:loop
 
 qtyForSynthManifestTransaction is a Integer, with a setter and a getter in 
 BuildManifest.java. Now, if I submit the form, 
 setQtyForSynthManifestTransaction is called with the value that I submitted, 
 that's fine, but the setter is called a second time, and it sets the value 
 to null, so when createSyntheticTransactionFromSpec or 
 createSyntheticTransactionFromPart are finally called, the quantity is set 
 to null!
 
 I have put a breakpoint on the awake method in BuildManifest, and awake() is 
 called as many time as I have rows in my table. So for example, if I had 10 
 rows, BuildManifest is called 10 times. After the first awake, 
 setQtyForSynthManifestTransaction is called to the correct value, after than 
 awake() is called a couple of times and boum! 
 setQtyForSynthManifestTransaction is called with a null value!
 
 So what's the trick?
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/jlmiller%40kahalawai.com
 
 This email sent to jlmil...@kahalawai.com
 


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Sub-components woes

2012-11-15 Thread Pascal Robert

Le 2012-11-14 à 21:16, Chuck Hill ch...@global-village.net a écrit :

 I have had this happen to me before, but I don't recall why.  Logging out a 
 stack trace (or setting a breakpoint if you are feeling modern) when 
 setQtyForSynthManifestTransaction is called with a null value is the quickest 
 way to solve this.

It's the exact same stack trace:

BuildManifest.setQtyForSynthManifestTransaction(Integer) line: 112  
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available 
[native method]  
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39  
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25  
Method.invoke(Object, Object...) line: 597  
NSKeyValueCoding$ValueAccessor$1.setMethodValue(Object, Method, Object) line: 
643   
NSKeyValueCoding$_NumberMethodBinding(NSKeyValueCoding$_MethodBinding).setValueInObject(Object,
 Object) line: 1150  
NSKeyValueCoding$_NumberMethodBinding.setValueInObject(Object, Object) line: 
1183   
NSKeyValueCoding$DefaultImplementation.takeValueForKey(Object, Object, String) 
line: 1354   
BuildManifest(WOComponent).takeValueForKey(Object, String) line: 1748   
NSKeyValueCoding$Utility.takeValueForKey(Object, Object, String) line: 469  
NSValidation$DefaultImplementation.validateTakeValueForKeyPath(Object, Object, 
String) line: 679
BuildManifest(WOComponent).validateTakeValueForKeyPath(Object, String) line: 
1424   
WOHelperFunctionKeyValueAssociation(WOKeyValueAssociation).setValue(Object, 
WOComponent) line: 76   
WOHelperFunctionKeyValueAssociation.setValue(Object, WOComponent) line: 21  
ERXWOTextField.takeValuesFromRequest(WORequest, WOContext) line: 166
ERXWORepetition(WODynamicGroup).takeChildrenValuesFromRequest(WORequest, 
WOContext) line: 84
ERXWORepetition(WODynamicGroup).takeValuesFromRequest(WORequest, WOContext) 
line: 93
ERXWORepetition.takeValuesFromRequest(WORequest, WOContext) line: 451   
ERXWOConditional(WODynamicGroup).takeChildrenValuesFromRequest(WORequest, 
WOContext) line: 84   
ERXWOConditional.takeChildrenValuesFromRequest(WORequest, WOContext) line: 97   
ERXWOConditional(WODynamicGroup).takeValuesFromRequest(WORequest, WOContext) 
line: 93   
ERXWOConditional.takeValuesFromRequest(WORequest, WOContext) line: 91   
ERXElse(WODynamicGroup).takeChildrenValuesFromRequest(WORequest, WOContext) 
line: 84
ERXElse(WODynamicGroup).takeValuesFromRequest(WORequest, WOContext) line: 93
ERXElse.takeValuesFromRequest(WORequest, WOContext) line: 35
WODynamicGroup.takeChildrenValuesFromRequest(WORequest, WOContext) line: 84 
WODynamicGroup.takeValuesFromRequest(WORequest, WOContext) line: 93 
BuildManifest(WOComponent).takeValuesFromRequest(WORequest, WOContext) line: 
1051   
BuildManifest(ERXComponent).takeValuesFromRequest(WORequest, WOContext) line: 
143   
BuildManifest(ERXNonSynchronizingComponent).takeValuesFromRequest(WORequest, 
WOContext) line: 51
WOComponentReference.takeValuesFromRequest(WORequest, WOContext) line: 119  
ERXElse(WODynamicGroup).takeChildrenValuesFromRequest(WORequest, WOContext) 
line: 84
ERXElse(WODynamicGroup).takeValuesFromRequest(WORequest, WOContext) line: 93
ERXElse.takeValuesFromRequest(WORequest, WOContext) line: 35
AjaxUpdateContainer(WODynamicGroup).takeChildrenValuesFromRequest(WORequest, 
WOContext) line: 84
AjaxUpdateContainer(WODynamicGroup).takeValuesFromRequest(WORequest, WOContext) 
line: 93
AjaxUpdateContainer.takeValuesFromRequest(WORequest, WOContext) line: 63
ERXWORepetition(WODynamicGroup).takeChildrenValuesFromRequest(WORequest, 
WOContext) line: 84
ERXWORepetition(WODynamicGroup).takeValuesFromRequest(WORequest, WOContext) 
line: 93
ERXWORepetition.takeValuesFromRequest(WORequest, WOContext) line: 451   
WODynamicGroup.takeChildrenValuesFromRequest(WORequest, WOContext) line: 84 
WODynamicGroup.takeValuesFromRequest(WORequest, WOContext) line: 93 
AvailableParts(WOComponent).takeValuesFromRequest(WORequest, WOContext) line: 
1051  
AvailableParts(ERXComponent).takeValuesFromRequest(WORequest, WOContext) line: 
143  
WOComponentReference.takeValuesFromRequest(WORequest, WOContext) line: 119  
AjaxUpdateContainer(WODynamicGroup).takeChildrenValuesFromRequest(WORequest, 
WOContext) line: 84
AjaxUpdateContainer(WODynamicGroup).takeValuesFromRequest(WORequest, WOContext) 
line: 93
AjaxUpdateContainer.takeValuesFromRequest(WORequest, WOContext) line: 63
ERXWOForm(WODynamicGroup).takeChildrenValuesFromRequest(WORequest, WOContext) 
line: 84  
ERXWOForm(WODynamicGroup).takeValuesFromRequest(WORequest, WOContext) line: 93  
ERXWOForm.takeValuesFromRequest(WORequest, WOContext) line: 281 
WODynamicGroup.takeChildrenValuesFromRequest(WORequest, WOContext) line: 84 
WODynamicGroup.takeValuesFromRequest(WORequest, WOContext) line: 93 
WOComponentContent.takeValuesFromRequest(WORequest, 

Re: Sub-components woes

2012-11-15 Thread Ramsey Gurley

On Nov 15, 2012, at 5:12 AM, Pascal Robert wrote:

 
 Le 2012-11-14 à 21:07, Johnny Miller jlmil...@kahalawai.com a écrit :
 
 I too have trouble with this stuff all the time...
 
 if it is a stateless components where does qtyForSynthManifestTransaction 
 get stored?
 
 It's not stored anywhere except in the component, I use this variable in a 
 method in the component and in the text field, and that's it.


That would be the problem. All ivars must be reset in the reset() method 
because only one instance of the stateless component will be created. The 
stateless component will be reused in the loop and even across sessions. 

https://developer.apple.com/legacy/mac/library/documentation/InternetWeb/Reference/WO542Reference/com/webobjects/appserver/WOComponent.html#isStateless()

The reset method is called at each stage, takeValues, invoke, and append, so 
you can't get a value in takeValues stage and then use it in the invokeAction 
stage. If you change the component to a non synchronizing component, it should 
work. With a non sync you get a component instance per repetition like you 
would a normal WOComponent. 

Non sync is slower than stateless because you create lots of instance tho. If 
you can stash the value somewhere outside the component (an EO) during 
takeValues, and then retrieve it in invokeAction, it should work too.

Ramsey


 
 Do you have automatic binding turned off as well?
 
 Yes. And I inherit from ERXStatelessComponent
 
 
 On Nov 14, 2012, at 3:51 PM, Pascal Robert prob...@macti.ca wrote:
 
 I think I still have to understand a couple of things about components. So 
 I have a component that display a table where each row is coming from a 
 WORepetition. Inside each row, I have a column that calls a stateless 
 sub-component:
 
 td class=manifest_column
  wo:BuildManifest selectedProject=$selectedProject 
 spec=$childSpec.spec transactions=$~transactionsForSpec(childSpec.spec) 
 employee=$~employee rootTransaction=$rootTransaction /
 /td
 
 In BuildManifest, I have the following code:
 
 wo:loop list=$spec.parts item=$partItem
 wo:if condition=$spec.isLotInventory
 wo:str value=$partItem.serialNumber /  
 /wo:if
 wo:textfield value=$qtyForSynthManifestTransaction size=4 
 numberformat=# style=padding: 0px; margin: 0px; /
 wo:if condition=$spec.isLotInventory
 wo:AjaxSubmitButton updateContainerID=$spec.inventoryNumber 
 value=SM action=$~createSyntheticTransactionFromPart(partItem) / br /
 /wo:if
 wo:else
 wo:AjaxSubmitButton updateContainerID=$spec.inventoryNumber 
 value=SM action=$~createSyntheticTransactionFromSpec() /
 /wo:else
 /wo:loop
 
 qtyForSynthManifestTransaction is a Integer, with a setter and a getter in 
 BuildManifest.java. Now, if I submit the form, 
 setQtyForSynthManifestTransaction is called with the value that I 
 submitted, that's fine, but the setter is called a second time, and it sets 
 the value to null, so when createSyntheticTransactionFromSpec or 
 createSyntheticTransactionFromPart are finally called, the quantity is set 
 to null!
 
 I have put a breakpoint on the awake method in BuildManifest, and awake() 
 is called as many time as I have rows in my table. So for example, if I had 
 10 rows, BuildManifest is called 10 times. After the first awake, 
 setQtyForSynthManifestTransaction is called to the correct value, after 
 than awake() is called a couple of times and boum! 
 setQtyForSynthManifestTransaction is called with a null value!
 
 So what's the trick?
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/jlmiller%40kahalawai.com
 
 This email sent to jlmil...@kahalawai.com
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com
 
 This email sent to rgur...@smarthealth.com


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

WO Developers

2012-11-15 Thread Juergen Lorenz Simon
Hello,

I can offer two experienced WO developers in Germany right now. If you need us, 
please drop me a line.

Kind Regards,
Jürgen Simon

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Code completion for a component's binding

2012-11-15 Thread Johnny Miller
Hi,

I would like to add code completion to a component the way in WOString it will 
give you a list of suggested number or date formats for the respective binding.

How do you declare this in your component?

Thanks in advance,

Aloha,
Mr. Johnny Miller
Web Development Manager
Kahalawai Media Company
Lahaina, HI 96761
tel: (808) 661-7962 | mobile: (808) 283-0791
website | e-mail

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Code completion for a component's binding

2012-11-15 Thread Lon Varscsak
Create an .api file (it's a tab in WOLips on the component) and put what
bindings you want in there.

-Lon

On Thu, Nov 15, 2012 at 3:14 PM, Johnny Miller jlmil...@kahalawai.comwrote:

 Hi,

 I would like to add code completion to a component the way in WOString it
 will give you a list of suggested number or date formats for the respective
 binding.

 How do you declare this in your component?

 Thanks in advance,

   Aloha,   Mr. Johnny Miller
 Web Development Manager
 Kahalawai Media Company
 Lahaina, HI 96761
 tel: (808) 661-7962 | mobile: (808) 283-0791
 website http://www.kahalawai.com | e-mail +jlmil...@kahalawai.com


  ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:

 https://lists.apple.com/mailman/options/webobjects-dev/lon.varscsak%40gmail.com

 This email sent to lon.varsc...@gmail.com


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Code completion for a component's binding

2012-11-15 Thread Johnny Miller
Hi Lon,

Actually, I'm wondering how to add code completion to the value of the binding.

i.e. when you set value of the dateformat binding for WOString the code 
completion will give you a suggested list of possible date formats i.e. %m/%d/%y

I image that could also be set in the .api file but I don't believe WOLips 
supports it?

Aloha,
Mr. Johnny Miller
Web Development Manager
Kahalawai Media Company
Lahaina, HI 96761
tel: (808) 661-7962 | mobile: (808) 283-0791
website | e-mail

On Nov 15, 2012, at 1:30 PM, Lon Varscsak lon.varsc...@gmail.com wrote:

 Create an .api file (it's a tab in WOLips on the component) and put what 
 bindings you want in there.
 
 -Lon
 
 On Thu, Nov 15, 2012 at 3:14 PM, Johnny Miller jlmil...@kahalawai.com wrote:
 Hi,
 
 I would like to add code completion to a component the way in WOString it 
 will give you a list of suggested number or date formats for the respective 
 binding.
 
 How do you declare this in your component?
 
 Thanks in advance,
 
 Aloha,
 Mr. Johnny Miller
 Web Development Manager
 Kahalawai Media Company
 Lahaina, HI 96761
 tel: (808) 661-7962 | mobile: (808) 283-0791
 website | e-mail  
 
 
  ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/lon.varscsak%40gmail.com
 
 This email sent to lon.varsc...@gmail.com
 
 

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Code completion for a component's binding

2012-11-15 Thread Michael Sharp
I've wondered myself, so I just had a sniff around some API files.

e.g. ERXEditDateJavascript.api contains the following:
binding name=dateformat defaults=Date Format Strings/

 … and offers the right hand side completion of exactly that in the wod editor 
- date format strings.  Changing this to:

binding name=dateformat defaults=Numbers Format Strings/

has the expected effect - number format completion choices.

I guess these come from somewhere in WOLips, not sure if they're configurable. 
Will keep digging.


Sharpy..


On 16/11/2012, at 8:14 AM, Johnny Miller jlmil...@kahalawai.com wrote:

 Hi,
 
 I would like to add code completion to a component the way in WOString it 
 will give you a list of suggested number or date formats for the respective 
 binding.
 
 How do you declare this in your component?
 
 Thanks in advance,
 
 Aloha,
 Mr. Johnny Miller
 Web Development Manager
 Kahalawai Media Company
 Lahaina, HI 96761
 tel: (808) 661-7962 | mobile: (808) 283-0791
 website | e-mail  
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/getsharp%40gmail.com
 
 This email sent to getsh...@gmail.com



smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Code completion for a component's binding

2012-11-15 Thread Lon Varscsak
Ah, gotcha…yeah for values like dateformat there isn't any completion (that
I know of).  For other values like value it will complete after the $.
 So wo:str value=$myV can complete to myVar.

-Lon

On Thu, Nov 15, 2012 at 4:39 PM, Johnny Miller jlmil...@kahalawai.comwrote:

 Hi Lon,

 Actually, I'm wondering how to add code completion to the value of the
 binding.

 i.e. when you set value of the dateformat binding for WOString the code
 completion will give you a suggested list of possible date formats i.e.
 %m/%d/%y

 I image that could also be set in the .api file but I don't believe WOLips
 supports it?

   Aloha,   Mr. Johnny Miller
 Web Development Manager
 Kahalawai Media Company
 Lahaina, HI 96761
 tel: (808) 661-7962 | mobile: (808) 283-0791
 website http://www.kahalawai.com | e-mail +jlmil...@kahalawai.com

 On Nov 15, 2012, at 1:30 PM, Lon Varscsak lon.varsc...@gmail.com wrote:

 Create an .api file (it's a tab in WOLips on the component) and put what
 bindings you want in there.

 -Lon

 On Thu, Nov 15, 2012 at 3:14 PM, Johnny Miller jlmil...@kahalawai.comwrote:

 Hi,

 I would like to add code completion to a component the way in WOString it
 will give you a list of suggested number or date formats for the respective
 binding.

 How do you declare this in your component?

 Thanks in advance,

   Aloha,   Mr. Johnny Miller
 Web Development Manager
 Kahalawai Media Company
 Lahaina, HI 96761
 tel: (808) 661-7962 | mobile: (808) 283-0791
 website http://www.kahalawai.com/ | e-mail +jlmil...@kahalawai.com


  ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:

 https://lists.apple.com/mailman/options/webobjects-dev/lon.varscsak%40gmail.com

 This email sent to lon.varsc...@gmail.com




 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Code completion for a component's binding

2012-11-15 Thread Chuck Hill
I think what you are referring to is hard coded for specific binding types in 
the component editor.


Chuck


On 2012-11-15, at 3:39 PM, Johnny Miller wrote:

 Hi Lon,
 
 Actually, I'm wondering how to add code completion to the value of the 
 binding.
 
 i.e. when you set value of the dateformat binding for WOString the code 
 completion will give you a suggested list of possible date formats i.e. 
 %m/%d/%y
 
 I image that could also be set in the .api file but I don't believe WOLips 
 supports it?
 
 Aloha,
 Mr. Johnny Miller
 Web Development Manager
 Kahalawai Media Company
 Lahaina, HI 96761
 tel: (808) 661-7962 | mobile: (808) 283-0791
 website | e-mail  
 
 On Nov 15, 2012, at 1:30 PM, Lon Varscsak lon.varsc...@gmail.com wrote:
 
 Create an .api file (it's a tab in WOLips on the component) and put what 
 bindings you want in there.
 
 -Lon
 
 On Thu, Nov 15, 2012 at 3:14 PM, Johnny Miller jlmil...@kahalawai.com 
 wrote:
 Hi,
 
 I would like to add code completion to a component the way in WOString it 
 will give you a list of suggested number or date formats for the respective 
 binding.
 
 How do you declare this in your component?
 
 Thanks in advance,
 
 Aloha,
 Mr. Johnny Miller
 Web Development Manager
 Kahalawai Media Company
 Lahaina, HI 96761
 tel: (808) 661-7962 | mobile: (808) 283-0791
 website | e-mail 
 
 
  ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/lon.varscsak%40gmail.com
 
 This email sent to lon.varsc...@gmail.com
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
 
 This email sent to ch...@global-village.net

-- 
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall 
knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/gvc/practical_webobjects

Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing 
Companies in B.C! 
Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of 
Canada’s Fastest-Growing Companies by PROFIT Magazine!









 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Code completion for a component's binding

2012-11-15 Thread Michael Sharp
They seem to be defined in code in WOLips. The possible values for defaults 
here:

org.objectstyle.wolips.bindings.api.IApiBinding

public static final String[] ALL_DEFAULTS = new String[] { Undefined, 
IApiBinding.ACTIONS_DEFAULT, Boolean, YES/NO, Date Format Strings, 
Number Format Strings, MIME Types, Direct Actions, Direct Action 
Classes, Page Names, Frameworks, Resources };

And dealt with here org.objectstyle.wolips.bindings.api.ApiUtils

eg

if (Date Format Strings.equals(defaultsName)) {
  validValues.add(\%m/%d/%y\);
  validValues.add(\%B %d, %Y\);
  validValues.add(\%b %d, %Y\);
  validValues.add(\%A, %B %d, %Y\);
  validValues.add(\%A, %b %d, %Y\);
  validValues.add(\%d.%m.%y\);
  validValues.add(\%d %B %y\);
  validValues.add(\%d %b %y\);
  validValues.add(\%A %d %B %Y\);
  validValues.add(\%A %d %b %Y\);
  validValues.add(\%x\);
  validValues.add(\%H:%M:%S\);
  validValues.add(\%I:%M:%S %p\);
  validValues.add(\%H:%M\);
  validValues.add(\%I:%M %p\);
  validValues.add(\%X\);
}


Sharpy

On 16/11/2012, at 9:41 AM, Michael Sharp getsh...@gmail.com wrote:

 I've wondered myself, so I just had a sniff around some API files.
 
 e.g. ERXEditDateJavascript.api contains the following:
   binding name=dateformat defaults=Date Format Strings/
 
  … and offers the right hand side completion of exactly that in the wod 
 editor - date format strings.  Changing this to:
 
   binding name=dateformat defaults=Numbers Format Strings/
 
 has the expected effect - number format completion choices.
 
 I guess these come from somewhere in WOLips, not sure if they're 
 configurable. Will keep digging.
 
 
 Sharpy..
 
 
 On 16/11/2012, at 8:14 AM, Johnny Miller jlmil...@kahalawai.com wrote:
 
 Hi,
 
 I would like to add code completion to a component the way in WOString it 
 will give you a list of suggested number or date formats for the respective 
 binding.
 
 How do you declare this in your component?
 
 Thanks in advance,
 
 Aloha,
 Mr. Johnny Miller
 Web Development Manager
 Kahalawai Media Company
 Lahaina, HI 96761
 tel: (808) 661-7962 | mobile: (808) 283-0791
 website | e-mail 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/getsharp%40gmail.com
 
 This email sent to getsh...@gmail.com
 



smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Code completion for a component's binding

2012-11-15 Thread Johnny Miller
Bummer...

Thanks anyway!

On Nov 15, 2012, at 1:52 PM, Michael Sharp getsh...@gmail.com wrote:

 They seem to be defined in code in WOLips. The possible values for defaults 
 here:
 
 org.objectstyle.wolips.bindings.api.IApiBinding
 
 public static final String[] ALL_DEFAULTS = new String[] { Undefined, 
 IApiBinding.ACTIONS_DEFAULT, Boolean, YES/NO, Date Format Strings, 
 Number Format Strings, MIME Types, Direct Actions, Direct Action 
 Classes, Page Names, Frameworks, Resources };
 
 And dealt with here org.objectstyle.wolips.bindings.api.ApiUtils
 
 eg
 
 if (Date Format Strings.equals(defaultsName)) {
   validValues.add(\%m/%d/%y\);
   validValues.add(\%B %d, %Y\);
   validValues.add(\%b %d, %Y\);
   validValues.add(\%A, %B %d, %Y\);
   validValues.add(\%A, %b %d, %Y\);
   validValues.add(\%d.%m.%y\);
   validValues.add(\%d %B %y\);
   validValues.add(\%d %b %y\);
   validValues.add(\%A %d %B %Y\);
   validValues.add(\%A %d %b %Y\);
   validValues.add(\%x\);
   validValues.add(\%H:%M:%S\);
   validValues.add(\%I:%M:%S %p\);
   validValues.add(\%H:%M\);
   validValues.add(\%I:%M %p\);
   validValues.add(\%X\);
 }
 
 
 Sharpy
 
 On 16/11/2012, at 9:41 AM, Michael Sharp getsh...@gmail.com wrote:
 
 I've wondered myself, so I just had a sniff around some API files.
 
 e.g. ERXEditDateJavascript.api contains the following:
  binding name=dateformat defaults=Date Format Strings/
 
  … and offers the right hand side completion of exactly that in the wod 
 editor - date format strings.  Changing this to:
 
  binding name=dateformat defaults=Numbers Format Strings/
 
 has the expected effect - number format completion choices.
 
 I guess these come from somewhere in WOLips, not sure if they're 
 configurable. Will keep digging.
 
 
 Sharpy..
 
 
 On 16/11/2012, at 8:14 AM, Johnny Miller jlmil...@kahalawai.com wrote:
 
 Hi,
 
 I would like to add code completion to a component the way in WOString it 
 will give you a list of suggested number or date formats for the respective 
 binding.
 
 How do you declare this in your component?
 
 Thanks in advance,
 
 Aloha,
 Mr. Johnny Miller
 Web Development Manager
 Kahalawai Media Company
 Lahaina, HI 96761
 tel: (808) 661-7962 | mobile: (808) 283-0791
 website | e-mail
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/getsharp%40gmail.com
 
 This email sent to getsh...@gmail.com
 
 

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Code completion for a component's binding

2012-11-15 Thread Chuck Hill
You could always extend WOLips!

:-)


On 2012-11-15, at 3:57 PM, Johnny Miller wrote:

 Bummer...
 
 Thanks anyway!
 
 On Nov 15, 2012, at 1:52 PM, Michael Sharp getsh...@gmail.com wrote:
 
 They seem to be defined in code in WOLips. The possible values for 
 defaults here:
 
 org.objectstyle.wolips.bindings.api.IApiBinding
 
 public static final String[] ALL_DEFAULTS = new String[] { Undefined, 
 IApiBinding.ACTIONS_DEFAULT, Boolean, YES/NO, Date Format Strings, 
 Number Format Strings, MIME Types, Direct Actions, Direct Action 
 Classes, Page Names, Frameworks, Resources };
 
 And dealt with here org.objectstyle.wolips.bindings.api.ApiUtils
 
 eg
 
 if (Date Format Strings.equals(defaultsName)) {
   validValues.add(\%m/%d/%y\);
   validValues.add(\%B %d, %Y\);
   validValues.add(\%b %d, %Y\);
   validValues.add(\%A, %B %d, %Y\);
   validValues.add(\%A, %b %d, %Y\);
   validValues.add(\%d.%m.%y\);
   validValues.add(\%d %B %y\);
   validValues.add(\%d %b %y\);
   validValues.add(\%A %d %B %Y\);
   validValues.add(\%A %d %b %Y\);
   validValues.add(\%x\);
   validValues.add(\%H:%M:%S\);
   validValues.add(\%I:%M:%S %p\);
   validValues.add(\%H:%M\);
   validValues.add(\%I:%M %p\);
   validValues.add(\%X\);
 }
 
 
 Sharpy
 
 On 16/11/2012, at 9:41 AM, Michael Sharp getsh...@gmail.com wrote:
 
 I've wondered myself, so I just had a sniff around some API files.
 
 e.g. ERXEditDateJavascript.api contains the following:
 binding name=dateformat defaults=Date Format Strings/
 
  … and offers the right hand side completion of exactly that in the wod 
 editor - date format strings.  Changing this to:
 
 binding name=dateformat defaults=Numbers Format Strings/
 
 has the expected effect - number format completion choices.
 
 I guess these come from somewhere in WOLips, not sure if they're 
 configurable. Will keep digging.
 
 
 Sharpy..
 
 
 On 16/11/2012, at 8:14 AM, Johnny Miller jlmil...@kahalawai.com wrote:
 
 Hi,
 
 I would like to add code completion to a component the way in WOString it 
 will give you a list of suggested number or date formats for the 
 respective binding.
 
 How do you declare this in your component?
 
 Thanks in advance,
 
 Aloha,
 Mr. Johnny Miller
 Web Development Manager
 Kahalawai Media Company
 Lahaina, HI 96761
 tel: (808) 661-7962 | mobile: (808) 283-0791
 website | e-mail   
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/getsharp%40gmail.com
 
 This email sent to getsh...@gmail.com
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
 
 This email sent to ch...@global-village.net

-- 
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall 
knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/gvc/practical_webobjects

Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing 
Companies in B.C! 
Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of 
Canada’s Fastest-Growing Companies by PROFIT Magazine!









 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Code completion for a component's binding

2012-11-15 Thread Johnny Miller
I should for my own betterment...

I wonder what would be the smart way to do it?

In the API editor you do get a list of choices that corresponds to the list in 
Sharpy's email.  Maybe if one of the choices was Custom a table could appear, 
not unlike the bindings, where you could add the suggestions.  But where would 
you store the suggestions?  It would seem, to me, that the smartest place would 
be in the api file.  If we just added an attribute like default-suggestions 
whose values was a some kind of delimited string of suggestions do you think 
that would break anything?



On Nov 15, 2012, at 2:05 PM, Chuck Hill ch...@global-village.net wrote:

 You could always extend WOLips!
 
 :-)
 
 
 On 2012-11-15, at 3:57 PM, Johnny Miller wrote:
 
 Bummer...
 
 Thanks anyway!
 
 On Nov 15, 2012, at 1:52 PM, Michael Sharp getsh...@gmail.com wrote:
 
 They seem to be defined in code in WOLips. The possible values for 
 defaults here:
 
 org.objectstyle.wolips.bindings.api.IApiBinding
 
 public static final String[] ALL_DEFAULTS = new String[] { Undefined, 
 IApiBinding.ACTIONS_DEFAULT, Boolean, YES/NO, Date Format Strings, 
 Number Format Strings, MIME Types, Direct Actions, Direct Action 
 Classes, Page Names, Frameworks, Resources };
 
 And dealt with here org.objectstyle.wolips.bindings.api.ApiUtils
 
 eg
 
 if (Date Format Strings.equals(defaultsName)) {
  validValues.add(\%m/%d/%y\);
  validValues.add(\%B %d, %Y\);
  validValues.add(\%b %d, %Y\);
  validValues.add(\%A, %B %d, %Y\);
  validValues.add(\%A, %b %d, %Y\);
  validValues.add(\%d.%m.%y\);
  validValues.add(\%d %B %y\);
  validValues.add(\%d %b %y\);
  validValues.add(\%A %d %B %Y\);
  validValues.add(\%A %d %b %Y\);
  validValues.add(\%x\);
  validValues.add(\%H:%M:%S\);
  validValues.add(\%I:%M:%S %p\);
  validValues.add(\%H:%M\);
  validValues.add(\%I:%M %p\);
  validValues.add(\%X\);
}
 
 
 Sharpy
 
 On 16/11/2012, at 9:41 AM, Michael Sharp getsh...@gmail.com wrote:
 
 I've wondered myself, so I just had a sniff around some API files.
 
 e.g. ERXEditDateJavascript.api contains the following:
binding name=dateformat defaults=Date Format Strings/
 
 … and offers the right hand side completion of exactly that in the wod 
 editor - date format strings.  Changing this to:
 
binding name=dateformat defaults=Numbers Format Strings/
 
 has the expected effect - number format completion choices.
 
 I guess these come from somewhere in WOLips, not sure if they're 
 configurable. Will keep digging.
 
 
 Sharpy..
 
 
 On 16/11/2012, at 8:14 AM, Johnny Miller jlmil...@kahalawai.com wrote:
 
 Hi,
 
 I would like to add code completion to a component the way in WOString it 
 will give you a list of suggested number or date formats for the 
 respective binding.
 
 How do you declare this in your component?
 
 Thanks in advance,
 
 Aloha,
 Mr. Johnny Miller
 Web Development Manager
 Kahalawai Media Company
 Lahaina, HI 96761
 tel: (808) 661-7962 | mobile: (808) 283-0791
 website | e-mail  
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/getsharp%40gmail.com
 
 This email sent to getsh...@gmail.com
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
 
 This email sent to ch...@global-village.net
 
 -- 
 Chuck Hill Senior Consultant / VP Development
 
 Practical WebObjects - for developers who want to increase their overall 
 knowledge of WebObjects or who are trying to solve specific problems.
 http://www.global-village.net/gvc/practical_webobjects
 
 Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing 
 Companies in B.C! 
 Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of 
 Canada’s Fastest-Growing Companies by PROFIT Magazine!
 
 
 
 
 
 
 
 


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Code completion for a component's binding

2012-11-15 Thread Johann Werner

Am 16.11.2012 um 00:52 schrieb Michael Sharp getsh...@gmail.com:

 They seem to be defined in code in WOLips. The possible values for defaults 
 here:
 
 org.objectstyle.wolips.bindings.api.IApiBinding
 
 public static final String[] ALL_DEFAULTS = new String[] { Undefined, 
 IApiBinding.ACTIONS_DEFAULT, Boolean, YES/NO, Date Format Strings, 
 Number Format Strings, MIME Types, Direct Actions, Direct Action 
 Classes, Page Names, Frameworks, Resources };
 
 And dealt with here org.objectstyle.wolips.bindings.api.ApiUtils
 
 eg
 
 if (Date Format Strings.equals(defaultsName)) {
   validValues.add(\%m/%d/%y\);
   validValues.add(\%B %d, %Y\);
   validValues.add(\%b %d, %Y\);
   validValues.add(\%A, %B %d, %Y\);
   validValues.add(\%A, %b %d, %Y\);
   validValues.add(\%d.%m.%y\);
   validValues.add(\%d %B %y\);
   validValues.add(\%d %b %y\);
   validValues.add(\%A %d %B %Y\);
   validValues.add(\%A %d %b %Y\);
   validValues.add(\%x\);
   validValues.add(\%H:%M:%S\);
   validValues.add(\%I:%M:%S %p\);
   validValues.add(\%H:%M\);
   validValues.add(\%I:%M %p\);
   validValues.add(\%X\);
 }

That should probably be changed to SimpleDateFormat strings as 
NSTimestampFormatter understands those too and is deprecated.

 
 
 Sharpy
 
 On 16/11/2012, at 9:41 AM, Michael Sharp getsh...@gmail.com wrote:
 
 I've wondered myself, so I just had a sniff around some API files.
 
 e.g. ERXEditDateJavascript.api contains the following:
  binding name=dateformat defaults=Date Format Strings/
 
  … and offers the right hand side completion of exactly that in the wod 
 editor - date format strings.  Changing this to:
 
  binding name=dateformat defaults=Numbers Format Strings/
 
 has the expected effect - number format completion choices.
 
 I guess these come from somewhere in WOLips, not sure if they're 
 configurable. Will keep digging.
 
 
 Sharpy..
 
 
 On 16/11/2012, at 8:14 AM, Johnny Miller jlmil...@kahalawai.com wrote:
 
 Hi,
 
 I would like to add code completion to a component the way in WOString it 
 will give you a list of suggested number or date formats for the respective 
 binding.
 
 How do you declare this in your component?
 
 Thanks in advance,
 
 Aloha,
 Mr. Johnny Miller
 Web Development Manager
 Kahalawai Media Company
 Lahaina, HI 96761
 tel: (808) 661-7962 | mobile: (808) 283-0791
 website | e-mail
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/getsharp%40gmail.com
 
 This email sent to getsh...@gmail.com
 


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com