Re: Code completion for a component's binding
Re: Code completion for a component's binding
- Subject: Re: Code completion for a component's binding
- From: Johnny Miller <email@hidden>
- Date: Thu, 15 Nov 2012 14:19:47 -1000
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 <email@hidden> 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 <email@hidden> 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 <email@hidden> 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 <email@hidden> 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 (email@hidden)
>>>>> Help/Unsubscribe/Update your Subscription:
>>>>>
>>>>> This email sent to email@hidden
>>>>
>>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
> --
> 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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden