• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: foreach: list must not be a constant
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: foreach: list must not be a constant


  • Subject: Re: foreach: list must not be a constant
  • From: John Pollard <email@hidden>
  • Date: Thu, 14 Feb 2013 22:34:34 +0000

So changing getPlayerGroups to return an NSMutableArray fixed it, though why does foreach require a mutable array?
Is there any documentation that covers all the inline bindings and their arguments?
Many thanks
John

On 14 Feb 2013, at 22:24, John Pollard <email@hidden> wrote:

> It only seems to be called once for the page; though I have now put in lazy evaluation thanks.
> I had a moment of hope when I found I could right click on the error and Delete it in the Problems tab, but it came back on a rebuild. If only errors could be eternally vanquished by a right click + Delete!
>
> On 14 Feb 2013, at 19:51, Ken Anderson <email@hidden> wrote:
>
>> I would probably cache the result set and return it on subsequent calls (assuming it stays static throughout the page's lifetime).
>>
>> On Feb 14, 2013, at 2:43 PM, Chuck Hill <email@hidden> wrote:
>>
>>> Just an aside, but if you are using auto-binding sync that is going to be doing a lot of fetching.
>>>
>>> Chuck
>>>
>>> On 2013-02-14, at 11:33 AM, John Pollard wrote:
>>>
>>>> It is implemented as a method returning an NSArray:
>>>>
>>>> // Used to list players to tick who is playing
>>>> public NSArray getPlayerGroups()
>>>> {
>>>>     Object orderings[]={EOSortOrdering.sortOrderingWithKey("name", EOSortOrdering.CompareAscending)};
>>>>     NSArray sortOrderings = new NSArray(orderings);
>>>> 	return PlayerGroup.fetchAllPlayerGroups(ec, sortOrderings);
>>>> }
>>>>
>>>> This is actually in the super class of the component class (though I tried copying it to the actual component class and that didn't help. Neither did providing a setPlayerGroups method(), though I see no need to provide a set method.
>>>>
>>>> Thanks
>>>> John
>>>>
>>>> On 14 Feb 2013, at 19:29, Musall Maik <email@hidden> wrote:
>>>>
>>>>> Please show the Java implementation of that list.
>>>>>
>>>>> Am 14.02.2013 um 20:24 schrieb John Pollard <email@hidden>:
>>>>>
>>>>>> Hi List,
>>>>>>
>>>>>> In wolips html view I get an error on the first line of the following html code:
>>>>>>
>>>>>>     <wo:foreach list="$playerGroups" item="$nextPlayerGroup">
>>>>>>       <wo:ERQMListViewElement>
>>>>>>         <h3><webobject name="playerGroupLink"></webobject></h3>
>>>>>>       </wo:ERQMListViewElement>
>>>>>>     </wo:foreach>
>>>>>>
>>>>>> The error is on the foreach line: "list must not be a constant", though it isn't a constant and it works ok when run.
>>>>>>
>>>>>> I have updated wolips based on http://wocommunity.org/wolips/3.7/stable/
>>>>>>
>>>>>> Thanks for any help.
>>>>>> John
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> 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
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>>
>
>
> _______________________________________________
> 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


References: 
 >foreach: list must not be a constant (From: John Pollard <email@hidden>)
 >Re: foreach: list must not be a constant (From: Musall Maik <email@hidden>)
 >Re: foreach: list must not be a constant (From: John Pollard <email@hidden>)
 >Re: foreach: list must not be a constant (From: Chuck Hill <email@hidden>)
 >Re: foreach: list must not be a constant (From: Ken Anderson <email@hidden>)
 >Re: foreach: list must not be a constant (From: John Pollard <email@hidden>)

  • Prev by Date: Re: foreach: list must not be a constant
  • Next by Date: Re: WYSIWIG editor with WO
  • Previous by thread: Re: foreach: list must not be a constant
  • Next by thread: Re: foreach: list must not be a constant
  • Index(es):
    • Date
    • Thread