Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Bug Reports
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Bug Reports Post about errors or bugs encountered.


behavior of bin.WriteBytes(array())


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-20-2007, 06:20 PM
Knows the basics
 
Join Date: May 2007
Posts: 85
Default behavior of bin.WriteBytes(array())

hi,

If the file 'name' has a lenght of 500 bytes, and I rewrite that file with a array
that is only 150 bytes, like below, I expect the file will be closed after the lenght of the last writed array (150 bytes).
The file still stays on a file-lenght of 500 bytes... enoying thing...

FileOpen (c1,name,cRandom) 'open file for binary use
bin.New1(c1,True) 'make binair file-object
bin.WriteBytes(igni()) 'writes the complete igni-array binair
FileClose (c1)

Of coarse there are work arounds, but is this the normal behavior...

Put Claude Belgium
Reply With Quote
  #2 (permalink)  
Old 05-20-2007, 07:34 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,847
Default

This is the normal .net behavior.
You can just add:
If FileExists(name) Then FileDel(name)
FileOpen(...
Reply With Quote
  #3 (permalink)  
Old 05-21-2007, 09:09 AM
Knows the basics
 
Join Date: May 2007
Posts: 85
Default

Hi Erel,

Thanks, wil do it that way...

Put Claude Belgium
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Nullifying an Array mjcoon Questions & Help Needed 1 06-20-2008 05:20 PM
Different behavior in desktop vs. device on AddEvent willisgt Bug Reports 4 01-13-2008 12:29 PM
Array but not array Cableguy Questions & Help Needed 1 09-22-2007 08:09 PM
Array of Array possibility? Stellaferox Basic4ppc Wishlist 0 09-18-2007 12:16 PM
different behavior Desk and PPC Put Claude Questions & Help Needed 6 07-30-2007 12:06 PM


All times are GMT. The time now is 06:54 PM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0