yab requests

View previous topic View next topic Go down

yab requests

Post by bbjimmy on Mon May 04, 2015 1:29 pm

The following is a list of yab Issues from the german BeSly.de yab forum.
___________________________________________________________________


yab 1.7 have problems with special signs. Signs like $ and °

If you do...

z$ = "§§§§§§§§§§"
print "lengh of Strings = ", len(z$)

...you got the aswer 20, not 10

if you take a look to it with...

for i = 1 to len(z$)
print i, asc(mid$(z$, i, 1))
next i

you can see that the String are ACII signs: 194 and 167, 167 is the right sign, but that is the sign 194?

If i replace the § sign with the $ sign everything is ok  

tested with yab 1.7 with the standard ide
===================================

This is corect. yab's  length and asc commands len(a$) and asc(a$)
assume a one byte character. the character used here is a two byte character:


b$ = chrS(194)+chr$(167)
print b$

output:
§

It is up to the programmer to make adjustments in his code if he is to use multi-byte codes.

___________________________________________________________________

Chaotic Ideas/Wishes

1. BlockRead / BlockWrite
Here some ideas and wishes from our website
For a better access to files and the possibility not only read one
byte at a time / write to.

======================

This is partially working on my system, It currently needs one to poke to the file and not use the  print statement.

it works pretty well this way.

open #1 "filename" "r+"

I am going to work on this some more before I upload the files to github.

___________________________________________________________________


- FileFindFirst / FileFindNext

This could then times look for files recursively search through
directories, etc. without every awkward with the "system $" -
having to work instruction.
======================
try this...

t$ = system$("ls --format=single-column --color=none -a \""+dir$+"\" |sort -f")
___________________________________________________________________

- Chr$(0)

Yes, I know a vexed issue. Unfortunately, this is for "Xor" - based
encryption algorithms of absolute necessity.

======================

I need more info on this one.

___________________________________________________________________

- HVIF- Icons

Support for Haiku's "HVIF" - Icons and not only for the 16x16 or
32x32 pixel pictures.

==============================


done in 7.4.4.5

"BITMAP GET IconSize, Bitmap$, File$
 Copies the icon, shown in Tracker, of File$ in the specified IconSize onto Bitmap$. The icon will be resized to IconSize, and properly scaled if it is an hvicon."

___________________________________________________________________

- System-wide Mouse coordinates, not only from within a control.
==============================
haven't looked at this one yet. not sure it can be done.


___________________________________________________________________


Lelldorin Ideas/Wishes

- Internal attribute functions only use 4 signs, i need a lengh without
limiting, like the system attribute command
================================

need more info on this one.

___________________________________________________________________

- A Tabview TAB that can i place on the right site of the tabview
- Tabviews on the side not only bottom and top
- atomatically make tabs smaler then i make more tabs (lengh) as the
main window, like "first tab", "second tab"... to "first...", "second..."

===================================

I have looked at it, but need to study  it more
___________________________________________________________________



- editable columnbox, sort columnbox like excel
Chat Conversation End

===================================


I haven't been anle to find a way to get a message back whren the heading is pressed.

___________________________________________________________________

Camera


===================================

I need more information.

___________________________________________________________________


Make it possible to have all black interface.

===================================

this one is tough, many many changes, and some don't look easy.

___________________________________________________________________
avatar
bbjimmy

Posts : 10
Join date : 2015-04-21
Location : Coquille Oregon

View user profile http://fatelk.com

Back to top Go down

Re: yab requests

Post by bbjimmy on Tue May 05, 2015 9:24 pm

Recent updates:
I added an option to:

COLUMNBOX ADD ColumnBox$, Column, Row, Height, Item$

if Item$ = "__SmIC__="+FileName$ then the small Trackericon of the file FileName$ will be shown


yab fileboxdemo clean-up and speed-up ( it is almost usable now ).



block read/write

added a filemode: r+ ( read/write )
open #1 filename$, "r+"

* note: in this mode
print #a "foo",a$ doesn't work, one must:

poke #a,"foo"
poke #a,a$

I added BlockReadWriteDemo.yab and a library file, FileBlock.yab

With these changes, one does not need to read the whole file in to make changes to one block of data.

FileBlock.yab exports these subs:

openfile(filename$, recordlength, numberoffields)
// specify the record(block) length and number of fields for the file
// returns the filehandle number used for other subs


Field( filehandle,fieldnumber, fieldname$, fieldlength)
//specify the field name and length for the field numbered fieldnumber

lset(filehandle,fieldname$,data$)
//sets data$ on the left end of the field, truncates the string if it is longer than the fieldlength
//use this to prepare the record for writing

rset(filehandle,fieldname$,data$)
//sets data$ on the right end of the field, truncates the string if it is longer than the fieldlength
//use this to prepare the record for writing

readfield$(File, fieldname$)
//returns the data held in fieldname$

write_block(recordnumber, filehandle)
// Writes all the fields to the file at this record location
// Uses seek recordnumber*recordlength before the write
// Clears the field data
// Recordnumbers start at 0. ie the first record is 0, the second is 1 etc.
// appends data to the file if recordnumber is -1

read_block(recordnumber, filehandle)
// Reads the data at this record, or the next record if recordnumber is -1
// Ffills the fields with the data
// Recordnumbers start at 0. ie the first record is 0, the second is 1 etc.


note: this program only opens the file for one block opperation, then promptly closes the file.
There is no check that one has opened enough or long enough fields to make=up the blocklength. Bad things can happen if the total of the lengths of the fields do not match the blocklength.


to get these changes use the script ...http://yab.orgfree.com/GetLatest-yab.zip
avatar
bbjimmy

Posts : 10
Join date : 2015-04-21
Location : Coquille Oregon

View user profile http://fatelk.com

Back to top Go down

Re: yab requests

Post by clasqm on Wed May 13, 2015 4:47 am

This is pretty blue-sky, but is there any possibility of a webview, i.e. a view that will show an embedded url (either http or localhost)? That would make yab the go-to language (pun intended!) for creating site-specific browsers.

I imagine one would have to talk to Haiku's native webkit to do this, but you would need just two command: one to create and one to refresh.

For example: in my app Rondel, a Markdown editor, instead of handing off to WebPositive every time you want to see the resulting HTML, I could have a webview open next to the editor view, with (semi-) live updates. Like this: Mou Markdown editor.

Or you could make a container app for something like Google Docs or Zoho. A webview would open up new possibilities for yab, I think.
avatar
clasqm

Posts : 5
Join date : 2015-04-21

View user profile

Back to top Go down

Re: yab requests

Post by bbjimmy on Fri May 15, 2015 8:11 am

Yes, an embeded html rendered page would be really cool. but it is way beyond what I can do. It's hard enough chasing HAIKU, I can't even imagind chasing the web and html.
avatar
bbjimmy

Posts : 10
Join date : 2015-04-21
Location : Coquille Oregon

View user profile http://fatelk.com

Back to top Go down

Re: yab requests

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum