Użytkownik Ed Leafe napisał:
> My guess would be that at the point that the new record is created,
> the "blank" value that is initially set is conflicting with the image
> handling code in the image control. To test this, please add the
> following lines to dCursorMixin.py:
>
> 1525 def new(self):
> 1526 """Add a new record to the data set."""
> 1527 blank = self._getBlankRecord()
> print "Blank record:", blank
> print "type:", type(blank["us_user_picture"])
> 1528 self._records = dDataSet(self._records + (blank,))
> 1529 # Adjust the RowCount and position
> 1530 self.RowNumber = self.RowCount - 1
>
> Post the output here.
>
>
>> > Bad news is that dImage controls completely looses
>> > its behaviour, I mean: border, size and scale mode.
>> > Any suggestions folks, what can I do to avoid that?
>>
> That's understandable: once the underlying image classes get hosed,
> it's hard to expect them to behave properly.
>
Here is the output:
Blank record: {'us_stamp_picture': '', 'us_create_date':
datetime.datetime(1, 1, 1, 0, 0), 'us_name': u'', 'us_login': u'',
'us_write_date': datetime.datetime(1, 1, 1, 0, 0), 'iid': 0,
'us_user_picture': '', 'us_active': False, 'us_password': u'',
'us_signature': u''}
type: <type 'str'>
As I said previously, changing value to None in afterNew() method
resolves this issue.
--
Regards
Jacek Kałucki
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]