Recent Changes

Tuesday, May 30

Wednesday, April 26

  1. page Component Object Model programming edited ... So how does this all work at a technical level? Read about that here on MSDN. It’s not an easy…
    ...
    So how does this all work at a technical level? Read about that here on MSDN. It’s not an easy read.
    Caution: Direct use of variables in compiled programs
    ...
    be generated. If you switch the "abbreviate names" option off then you avoid the problem and can skip the rest of this paragraph.
    PROC_putvalue(XlNewSheet%, "cells(row%,col%).value("""+data$+""")")
    PROC_putvalue(Xlapp%, "Selection.value(data%)")
    ...
    REM!Keep vobj%
    PROC_putobject(tts%, "Voice(O vobj%)")
    Alternatively theA similar problem can arise if a static integer variable (A% to Z%) is passed in a parameter string. In this case the issue is that the specified variable may be manipulated byused internally to the COMLIB library (for example as a cunning splitting up into sub-stringsLOCAL or PRIVATE variable, or as a formal parameter) in which case it will be the value of that internal variable that does leaveis used rather than the variables exposed tovalue intended. Both problems may be eliminated by replacing the crunching engine such as:variable references in the supplied parameter string with their numeric values. For example:
    PROC_putvalue(XlNewSheet%, "cells("+STR$row%+","+STR$col%+").value("""+data$+""")")
    PROC_putvalue(Xlapp%, "Selection.value("+STR$data%+")")
    (view changes)
    7:22 am

Tuesday, April 18

Tuesday, April 4

  1. msg Excel message posted Excel Excel mangles data fields that look like anything it can convert into an internal numerical format.…
    Excel
    Excel mangles data fields that look like anything it can convert into an internal numerical format. I've updated the BeebWiki article (http://beebwiki.mdfs.net/CSV_file_reading_and_writing) with code to deal with this that I've evolved in my census processing code. I'm working on a version of this code with similar functionality.
    5:29 pm
  2. page Reading and writing CSV files edited ... LOCAL F%,R%,C%,I%,A$,C$ F% = OPENIN(file$) IF F%=0 THEN ERROR 100, 214, "Could not…
    ...
    LOCAL F%,R%,C%,I%,A$,C$
    F% = OPENIN(file$)
    IF F%=0 THEN ERROR 100,214, "Could not
    array$() = ""
    REPEAT
    INPUT #F%,A$
    IF ASCA$=10 A$ASCA$=10:A$ = MID$(A$,2)
    FOR C% = 0 TO DIM(array$(),2)
    I% = 1
    ...
    ENDWHILE
    I% = INSTR(A$,",",I%)
    IF I%=0 I%I%=0:I% = LENA$+1
    IF ASCA$=34 C$ASCA$=34:C$ = MID$(A$,2,I%-3)
    A$ = MID$(A$,I%+1)
    REPEAT
    I% = INSTR(C$, """""")
    IF I% C$I%:C$ = LEFT$(C$,I%)+MID$(C$,I%+2)
    UNTIL I%=0
    array$(R%,C%) = C$
    ...
    LOCAL F%,R%,C%,I%,A$,C$
    F% = OPENOUT(file$)
    ...
    THEN ERROR 100,192, "Could not
    FOR R% = 0 TO DIM(array$(),1)
    A$ = ""
    ...
    REPEAT
    I% = INSTR(C$,"""",I%+2)
    IF I% : C$ =
    UNTIL I%=0
    IF INSTR(C$,",") OR INSTR(C$,"""") OR INSTR(C$,CHR$13) OR INSTR(C$,CHR$10) THEN
    (view changes)
    5:25 pm

Thursday, March 30

Sunday, March 12

  1. page Displaying an icon on a pushbutton edited ... ENDPROC This code is for a standalone button displayed in the main window, but can easily be …
    ...
    ENDPROC
    This code is for a standalone button displayed in the main window, but can easily be adapted for a button in a dialogue box (change the SendMessage call to a SendDlgItemMessage).
    You can similarly display an icon on a static control as follows:
    IMAGE_ICON = 1
    LR_LOADFROMFILE = 16
    SS_ICON = 3
    STM_SETIMAGE = 370
    INSTALL @lib$+"WINLIB5"
    ICOfile$ = @lib$+"..\bbchelp.ico"
    hButton = FN_staticbox("", 100, 100, 96, 96, 101, SS_ICON)
    SYS "LoadImage", 0, ICOfile$, IMAGE_ICON, 96, 96, LR_LOADFROMFILE TO hImage
    SYS "SendMessage", hButton, STM_SETIMAGE, IMAGE_ICON, hImage
    REPEAT
    WAIT 1
    UNTIL FALSE
    END

    (view changes)
    11:04 am

Thursday, March 9

  1. msg HTML message posted HTML Thanks - thats just what I wanted!
    HTML
    Thanks - thats just what I wanted!
    9:40 am
  2. msg HTML message posted HTML Yes. You can adapt the code here so that instead of opening a file selector it simply displays t…
    HTML
    Yes. You can adapt the code here so that instead of opening a file selector it simply displays the HTML document in the ATL child window. Basically just ignore all the menu stuff and pass the path or URL of the HTML document as the second parameter of FN_createwindow().
    8:35 am
  3. msg HTML message posted HTML This is probably quite a big question... but does anyone know if I can display a HTML document in a…
    HTML
    This is probably quite a big question... but does anyone know if I can display a HTML document in a BB4W program?
    8:02 am

More