Author Topic: OpenFileDialog  (Read 25712 times)

0 Members and 1 Guest are viewing this topic.

Mike Lobanovsky

  • Guest
Re: OpenFileDialog
« Reply #75 on: July 25, 2014, 12:35:48 PM »
Oh...

That means we should go on searching.

[EDIT] Oh again. I've noticed Charles edited his previous message so Aurel, it means we (or rather you) should abandon your fixed length buffer char tx[500000] and use a dynamic string tx instead to load the file. Then if you need to traverse this string and evaluate separate chars in it later on, you can define

Code: [Select]
sys p = strptr(tx) // define pointer

p++ // increment pointer
P-- // decrement pointer

.... = *p // get value at pointer
*p = .... // set value at pointer

and use the p pointer to traverse the file buffer similar to how you used the (i) index in your former fixed-length array.

Hopefully Charles will fix this inconsistency with time.
« Last Edit: July 25, 2014, 01:03:55 PM by Mike Lobanovsky »

Aurel

  • Guest
Re: OpenFileDialog
« Reply #76 on: July 25, 2014, 01:23:37 PM »
Quote
That is a symptom of string corruption somewhere.

exactly...
I don't know how many times i repeat
that all string oprations in old dll which i use for my interpreter (which require lot of string
mumbo-jumbo) work as is suposed to be but in new dll not...

yeah i hope to....and because of constnat changes how we can build larger program without
annoying problems ...

JRS

  • Guest
Re: OpenFileDialog
« Reply #77 on: July 25, 2014, 01:28:55 PM »
Aurel,

It doesn't help Charles by you saying it's broken and how upset you are about it.

It would be more helpful if you could create repeatable small snippets of broken O2 code.  I don't know of any other BASIC developer that is more responsive to issues than Charles.


Mike Lobanovsky

  • Guest
Re: OpenFileDialog
« Reply #78 on: July 25, 2014, 01:42:08 PM »
Aurel,

Stop that please, will you? OxygenBasic is a few orders of magnitude more complex than AB and infinitely more complex than the Toy interpreter. There are hundreds if not thousands of cross references in it and it takes time to debug and test each minor fixup until it doesn't affect everything else it's related to. That's quite a piece of work for a lone developer however bright he might be.

If you want to be stable, you should select some O2 build that suits you and use it alone to develop your own product. That's what I've been doing for years with GCC v4.3.3 in FBSL while everybody else was using v4.4, v4.5 .. and now, v4.8.1.

Oxygen is under constant development and a lot of features can't always be 100% backward compatible. That's not a curse but rather a tremendous benefit. Look at all those hundreds of abandoned BASIC's that nobody's gonna develop any more, ever. You can find some stable one among them too. Say, PowerBASIC or FreeBasic for example -- they are very, very good, fast, stable, and field proven to be usable for language development. You might try out those ones for a change and still remain an OxygenBasic tester of small snippets of code.

Then in the end, when an official stable build of Oxygen is out, you can try and port your product to it and be sure that nobody's gonna change its functionality any more.

Please be reasonable.

Aurel

  • Guest
Re: OpenFileDialog
« Reply #79 on: July 25, 2014, 02:14:37 PM »
Quote
If you want to be stable, you should select some O2 build that suits you and use it alone to develop your own product

and what i am doing ?
what i want to see is much stable & bug-fixing & less new features and experiments.
do you can explain to me why such a bang as qb64 is more used that o2?
i know ...becuse is more traditional and simple to use (even is a ...)
for example just look into PureBasic ..sites..etc
and you will figured very quickly why is good...

ok maybe i babeling this time too much..... :-X
i will use older version ok..ok..ok  ::)

Charles Pegge

  • Guest
Re: OpenFileDialog
« Reply #80 on: July 25, 2014, 03:21:00 PM »
John,

Yes I agree, that small pieces of broken code are ideal for tracking bugs. You can get most of them very quickly this way.

Aurel,

Using today's Oxygen, AsciEdit2 opens & saves files, no problem, but will not run, compile, or save-as - from the desktop.

Mike,

The best way to access bytes by pointer or index, is to use an overlay.

Unlike C, Oxygen indexes are direct offsets.

byte b at strptr tx
equivalent:
byte*b=strptr tx

later setting:
@b=strptr tx

'moving pointers
@b++
@b--

'pointer arithmetic
@b+=10

'simple
b=65 'A
'indexed
b[n]=65 'A
« Last Edit: July 25, 2014, 03:33:18 PM by Charles Pegge »

Mike Lobanovsky

  • Guest
Re: OpenFileDialog
« Reply #81 on: July 25, 2014, 06:39:02 PM »
@Aurel:

All I want to say is: Rome wasn't built in one day. Neither is Oxygen; it's under construction now. It isn't very reasonable to build any solid projects on top of it yet and try to keep them in sync with the ever evolving OxygenBasic, and demand its full compliance with your vision of what is right and what isn't. You'll be doing this totally at your own risk and you shouldn't expect any obligations on behalf of the language developer yet. This will last until Charles announces a stable version as soon as he gets his creation where he wants it to be. It's his own indisputable prerogative and noone else's.

In the meantime, do use the older DLL whichever you think is most suitable for your needs. There are still a hell of a lot of things you need to do in your interpreter before the potential of the older DLL is exhausted.


@Charles:

Thanks a lot again for your input. I don't claim any knowledge of OxygenBasic worth mentioning and I was simply trying to avoid jumping into false conclusions again. I know that my suggestion would work 100% sure in O2 but if you say that "overlays" will work better and/or easier and/or more naturally for the language then so be it.

Indeed I'm more familiar with the C methods of doing things than Oxygen's. But I promise to behave better. :)
« Last Edit: July 25, 2014, 07:07:14 PM by Mike Lobanovsky »

Charles Pegge

  • Guest
Re: OpenFileDialog
« Reply #82 on: July 25, 2014, 09:48:35 PM »
Mike,

OxygenBasic was first conceived without reference to C as a language. So there a few deviations as far as pointers and arrays are concerned :)

Oxygen's explicit pointers are rather primitive, which is why I recommend overlays. They are are intrinsically cast as sys type, unless an explicit cast is used. Left-side and right side casts are supported though.

sys p=strptr tx

(byte) *p=x

x= (byte) *p

Mike Lobanovsky

  • Guest
Re: OpenFileDialog
« Reply #83 on: July 26, 2014, 03:57:30 AM »
Hi Charles,

Are you calling them "primitive" only because they are void and as such don't support full-scale pointer arithmetics? I'm not noticing any inconvenience. In fact, I'm so fascinated by having pointers at all that switching back to VB6 to implement some of my freelance jobs makes me feel uneasy as if I'm having one of my hands chopped off with an axe. :)

Charles Pegge

  • Guest
Re: OpenFileDialog
« Reply #84 on: July 26, 2014, 08:46:22 AM »
Yes pointers, plain and simple. 'Primitive' means primordial rather than backward :)

I am glad you don't miss pointer arithmetic.