>From: Oeg Bizz
>Sent: Mon, November 29, 2010 12:56:16 PM
>
> Dave,
>
> I used the changes a little bit more today and found 2 problems
> with my previous solution; not considering the case where the
> element is None, and not considering the case where there are more
> than 1 element of the same type (list). I fixed that by adding
> some if conditions, but I wanted to make sure I mention that to you
> ASAP just in case. Thanks for all your help,
>
Oscar -
First, thanks for your work on this.
I apologize for being slow in responding. I've been working on a
few other things.
I'll look more closely at your suggested changes tomorrow. In the
meantime here is a question -- Since users might expect to get
un-encode text, is it possible that we should generate *two* get-
methods, one that returns the "raw" value and the other that
returns the value encoded. For example we might want to generate
*both* of the following:
def get_xxx(): return self.xxx
def getencoded_xxx(): return self.xxx.encode(ExternalEncoding)
What do you think?
- Dave
>
>
> From: Oeg Bizz <[email protected]>
> To: Dave Kuhlman <[email protected]>
> Sent: Fri, November 26, 2010 5:04:48 PM
> Subject: Re: encoding type problem
>
> Dave,
>
> generateDs uses the ExternalEncoding only when writing to a
> file and not when using the getters. I looked a the code and
> made the following changes to the generateGettersAndSetters on
> line ~3067:
>
> if childType in StringType or \
> childType == TokenType or \
> childType == DateTimeType or \
> childType == DateType:
> s1 = ' def get%s(self): return self.%s.encode(ExternalEncoding)\n' %
>(capName, name)
> else:
> s1 = ' def get%s(self): return self.%s\n' % (capName, name)
>
> This made the get methods to return the value modified using the
> ExternalEncoding. Please let me know if you believe I may have
> broken the code with this changes. Thanks in advance,
>
> Oscar
--
Dave Kuhlman
http://www.rexx.com/~dkuhlman
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
generateds-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/generateds-users