Dear Seaside, Magritte experts, I probably have some easy question for
you but well with Magritte there is one thing very sparse. Examples. I attach an example here. What I wan is a Magritte description for addresses which I can put into a combobox printed like this: zip city; street. I've get there while overwriting printOn in Address. This can't be the way to go. The next question I have. I'd like to have some context menu while right clicking on the address. There I want to have the choice to Edit the current address (maybe inline) go to the addresses overview I've looked through the JavaScript examples but have not found anything with acts on "right" click. It would be very kind to leas me to some actual tutorial about using Magritte 3, Seaside 3 etc. Regards Friedrich PS: If you know of a Magritte/Seasider looking for work, please let me know. -- Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki QC-Seaside-Tests-FriedrichDominicus.4.mcz (5K) Download Attachment |
Hello Friedrich
On Wed, May 2, 2012 at 4:45 AM, Friedrich Dominicus <[hidden email]> wrote: Dear Seaside, Magritte experts, I probably have some easy question for Use the labels: message with a block that takes an address object and returns the string e.g. [ :addr | addr zip, ' ', addr city. '; , addr state ]
There is an mbMenu package in the JQueryWidgetBox project on Squeaksource that might do what you want.
Happy Trails
John
_______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
John McKeon <[hidden email]> writes:
> Hello Friedrich > > On Wed, May 2, 2012 at 4:45 AM, Friedrich Dominicus < > [hidden email]> wrote: > > Dear Seaside, Magritte experts, I probably have some easy question for > you but well with Magritte there is one thing very sparse. Examples. > > I attach an example here. > What I wan is > a Magritte description for addresses which I can put into a combobox > printed like this: > zip city; street. > > > Use the labels: message with a block that takes an address object and returns > the string e.g. [ :addr | addr zip, ' ', addr city. '; , addr state ] Regards Friedrich -- Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
In the select tag for the "combo box"
html select
list: someCollectionOfAddr
labels: [ :addr | addr zip etc ]
callback: [ :addr | self doSomethingWith: addr ]
....
On Wed, May 2, 2012 at 9:39 AM, Friedrich Dominicus <[hidden email]> wrote:
_______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
John McKeon <[hidden email]> writes:
> In the select tag for the "combo box" > > html select > list: someCollectionOfAddr > labels: [ :addr | addr zip etc ] > callback: [ :addr | self doSomethingWith: addr ] I've not written any rendering for this box. I have used Magritte descriptionAddresses <magritteDescription> ^ MASingleOptionDescription new accessor: #addresses; label: 'Addresses' ; priority: 400; options: self addresses yourself it should render all the addresses in one combobox. And the elements are TAddress objects. If I'm not overwriting printOn. I just got the usual a TAddress in the combobox. What want is a) having a TAddress rendered in this printable (short) form zip city; street b) If I'm clicking on the combobox entry I want to get the choice on what I want to do. e.g editing this TAddress switching to the overview of the Addresses or what else I might find useful here. Does this clarify the things a bit? My idea was that I probably have to implement something derived from MAWriter but it seems I'm on the wrong track here. Regards Friedrich -- Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
You could use optionsAndLabels: which takes a collection of object->label associations
On Wed, May 2, 2012 at 10:20 AM, Friedrich Dominicus <[hidden email]> wrote:
_______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
John McKeon <[hidden email]> writes:
> You could use optionsAndLabels: which takes a collection of object->label > associations Ok, it seems I got along with optionsAndLabels: I just wonder how I could have figured that out myself. Thanks Friedrich -- Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
Ok with options als labels I got the TPerson stuff rendered nicely. Now
I want to display a collection of Persons (See TPersonsView) and there I want that the Addresses are rendered in a combobox. from which I could choose e.g to change the address of a Person. Currently I just get the rendering of the normal Ordered Collection. So in short how can I "plug" in or replace the rendering of this OrderedCollection such that is presents itself in some "choosable" form? And yes it would be great to have an edit link behind the address e.g in the TPersonView or even better would be a thing commands which would allow me to choose what to do with the address. There must be ways to plug into Magritte3 to achieve that.... Regards Friedrich -- Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus _______________________________________________ Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki QC-Seaside-Tests-FriedrichDominicus.7.mcz (7K) Download Attachment |
Free forum by Nabble | Edit this page |