On Thu, Feb 23, 2012 at 4:06 PM, Adam White <[email protected]>wrote:
> Hi guys, > > I'm trying to define a "PHONE" presentation, to store phone numbers as > a string, but display them is Australian format. > I've defined the classes & methods below - but in a gridedit, none of > this seems to be working. > i.e. phone numbers are displayed without formatting, parser is not > called, error message on invalid input defaults to the standard > message "Please enter a value", and so forth. > > Any ideas what I'm missing? > I haven't checked your code, but I notice you haven't said anything about your view declaration. To tell Weblocks to use a custom presentation and parser you normally say things like (defview foo-table-view (:type table) ... (phone :present-as phone) ...) (defview foo-form-view (:type table) ... (phone :present-as phone :parse-as phone) ...) Then you supply those view names when creating the widget. Does that help, or did you already know this? -- Scott -- You received this message because you are subscribed to the Google Groups "weblocks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/weblocks?hl=en.
