Changeset 351 for branches

Show
Ignore:
Timestamp:
05/07/07 20:30:51 (2 years ago)
Author:
keinfarbton
Message:

fix: "no more handles"
Now an array bounds error is next.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/poseidon/poseidon/controller/bottompanel.d

    r350 r351  
    149149class TextEx : Text { 
    150150     
     151    override void checkSubclass(){ 
     152    } 
     153 
    151154    public this (Composite parent, int style)  
    152155    { 
  • branches/poseidon/poseidon/controller/editor.d

    r350 r351  
    137137    this(SashForm parent) 
    138138    {        
    139         Stdout.formatln( "{} {}", __FILE__, __LINE__ ); 
    140139        super(parent, SWT.TOP | SWT.CLOSE | SWT.H_SCROLL | SWT.BORDER);  
    141140        pthis = this; 
     
    164163        }); 
    165164         
    166         Stdout.formatln( "{} {}", __FILE__, __LINE__ ); 
    167165        findDlg = new FindDlg(getShell(), this); 
    168         Stdout.formatln( "{} {}", __FILE__, __LINE__ ); 
    169166        findDlg.setImage( Globals.getImage( "find" ) ); // Set Icon 
    170         Stdout.formatln( "{} {}", __FILE__, __LINE__ ); 
    171167        // create the invisible scintilla for search and replace 
    172168        invisibleSC = new ScintillaEx(sShell, SWT.NONE); 
    173         Stdout.formatln( "{} {}", __FILE__, __LINE__ ); 
    174169        // don't collect undo actions 
    175170        invisibleSC.setUndoCollection(false); 
    176         Stdout.formatln( "{} {}", __FILE__, __LINE__ ); 
    177171         
    178172        GridData gdata = new GridData(); 
     
    181175        invisibleSC.setVisible(false); 
    182176         
    183         Stdout.formatln( "{} {}", __FILE__, __LINE__ ); 
    184177        updateI18N(); 
    185178 
    186         Stdout.formatln( "{} {}", __FILE__, __LINE__ ); 
    187179        // install the Shell's event handler to check ExternModify 
    188180        sShell.handleEvent(null, SWT.Activate, delegate(Event e) { 
     
    190182        }); 
    191183 
    192         Stdout.formatln( "{} {}", __FILE__, __LINE__ ); 
    193184        private_method_xpm          = getXpm( "images\\obj16\\xpm\\function_private_obj.xpm"); 
    194185        protected_method_xpm        = getXpm( "images\\obj16\\xpm\\function_protected_obj.xpm" ); 
     
    220211        enum_member_obj_xpm         = getXpm( "images\\obj16\\xpm\\enum_member_obj.xpm" ); 
    221212        template_obj_xpm            = getXpm( "images\\obj16\\xpm\\template_obj.xpm" ); 
    222         Stdout.formatln( "{} {}", __FILE__, __LINE__ ); 
    223213    } 
    224214 
  • branches/poseidon/poseidon/controller/scintillaex.d

    r350 r351  
    2828public this(Composite parent, int style){ 
    2929 
    30     Stdout.formatln( "{} {}", __FILE__, __LINE__ ); 
    3130    setDllFileName("scilexer.dll"); 
    32     Stdout.formatln( "{} {}", __FILE__, __LINE__ ); 
    3331     
    3432    super(parent, style); 
    35     Stdout.formatln( "{} {}", __FILE__, __LINE__ ); 
    3633     
    3734    init(); 
    38     Stdout.formatln( "{} {}", __FILE__, __LINE__ ); 
    3935     
    4036    handleNotify(null, SCN_UPDATEUI, &onUpdateUI); 
    4137    handleNotify(null, SCN_MARGINCLICK, &onMarginClick); 
    4238    handleNotify(null, SCN_CHARADDED, &onCharAdded); 
    43     Stdout.formatln( "{} {}", __FILE__, __LINE__ ); 
    4439} 
    4540 
     
    162157 
    163158public void init(){ 
    164     Stdout.formatln( "{} {}", __FILE__, __LINE__ ); 
    165159 
    166160    setCodePage(SC_CP_UTF8); 
    167161 
    168     Stdout.formatln( "{} {}", __FILE__, __LINE__ ); 
    169162    // F3 
    170163    // F4 
     
    187180    clearCmdKey('Y' + (SCMOD_CTRL << 16));   
    188181    clearCmdKey('Z' + (SCMOD_CTRL << 16)); 
    189     Stdout.formatln( "{} {}", __FILE__, __LINE__ ); 
    190182 
    191183     
     
    263255    assignCmdKey(SCK_DIVIDE     + (SCMOD_CTRL << 16),   SCI_SETZOOM); 
    264256*/     
    265     Stdout.formatln( "{} {}", __FILE__, __LINE__ ); 
    266257} 
    267258/** Scintilla default key mapping in C++ 
  • branches/poseidon/poseidon/loader.d

    r350 r351  
    66private import poseidon.globals; 
    77private import poseidon.controller.dialog.splash; 
     8import poseidon.scintilla; 
    89 
    910import tango.io.Stdout; 
    1011 
    11 version = TRACKING; 
     12//version = TRACKING; 
    1213 
    1314class Loader { 
     
    3435                //display = Display.getDefault(); 
    3536                shell = new Shell(display); 
    36  
     37                //auto com = new Composite( shell, SWT.NONE ); 
     38                //Stdout.formatln( "{} {} ", __FILE__, __LINE__ ); 
     39                //auto sc = new Scintilla( shell, SWT.NONE ); 
     40                //Stdout.formatln( "{} {} ", __FILE__, __LINE__ ); 
    3741 
    3842                // show splash screen if desired 
  • branches/poseidon/poseidon/scintilla.d

    r350 r351  
    6565alias int BOOL; 
    6666import poseidon.converter; 
     67import poseidon.utility; 
    6768/** 
    6869 * Describes a range for a search, a search pattern, and a range for the search result. 
     
    19141915private static void staticCtor() { 
    19151916    if(_handleOfDLL !is 0) return; 
    1916     if(dllToUse is null) 
     1917    if(dllToUse is null){ 
    19171918        dllToUse = ScintillaDll; 
    1918         _handleOfDLL = OS.LoadLibrary( new TCHAR( 0, String.fromUtf8(dllToUse), true )); 
     1919    } 
     1920    _handleOfDLL = OS.LoadLibrary( new TCHAR( 0, String.fromUtf8(dllToUse), true )); 
    19191921 
    19201922    // try to load standard  
    1921     if(_handleOfDLL is 0) 
     1923    if(_handleOfDLL is 0){ 
    19221924        _handleOfDLL = OS.LoadLibrary( new TCHAR( 0, String.fromUtf8(ScintillaDll), true )); 
    1923     if(_handleOfDLL is 0) 
     1925    } 
     1926    if(_handleOfDLL is 0){ 
    19241927        _handleOfDLL = OS.LoadLibrary( new TCHAR( 0, String.fromUtf8("Scintilla.dll\0"), true )); 
    1925      
     1928    } 
     1929 
    19261930    if(_handleOfDLL is 0){ 
    19271931        char[] errStr = Display.getDefault.dh_getLastErrorText(); 
    19281932        errStr ~= "\nLoadLibrary Failed : " ~ dllToUse; 
    1929                 auto mb = new MessageBox( null, SWT.OK|SWT.ICON_ERROR | SWT.APPLICATION_MODAL ); 
    1930                 mb.dh_setText( "Error" ); 
    1931                 mb.dh_setMessage( errStr ); 
    1932         //MessageBox.showMsg(errStr[], "Error", null, ); 
     1933        auto mb = new MessageBox( null, SWT.OK|SWT.ICON_ERROR | SWT.APPLICATION_MODAL ); 
     1934        mb.dh_setText( "Error" ); 
     1935        mb.dh_setMessage( errStr ); 
     1936        MessageBox_showMessage(errStr, "Error", null ); 
    19331937        return; 
    19341938    } 
    1935      
     1939 
    19361940    assert(_handleOfDLL); 
    1937         ScintillaClass = new TCHAR( 0, new String( "ScintillaClass" ), true); 
    1938         WNDCLASS lpWndClass = new WNDCLASS; 
    1939         OS.GetClassInfo( 0, ScintillaClass, lpWndClass); 
    1940         ScintillaProc = lpWndClass.lpfnWndProc; 
     1941    ScintillaClass = new TCHAR( 0, String.fromUtf8( ScintillaClassName ), true); 
     1942    WNDCLASS lpWndClass = new WNDCLASS; 
     1943    bool res = OS.GetClassInfo( 0, ScintillaClass, lpWndClass); 
     1944    assert( res ); 
     1945    ScintillaProc = lpWndClass.lpfnWndProc; 
    19411946} 
    19421947 
    19431948this (Composite parent, int style) { 
    1944     Stdout.formatln( "{} {}", __FILE__, __LINE__ ); 
    19451949    assert(parent); 
    19461950    staticCtor(); 
    19471951    Display disp = parent.getDisplay(); 
    19481952    DeviceData info = disp.getDeviceData (); 
    1949     Stdout.formatln( "{} {} {}", __FILE__, __LINE__, info.tracking ); 
    1950     Stdout.formatln( "{} {} objs:{} errs:{}", __FILE__, __LINE__, info.objects.length, info.errors.length ); 
    1951  
    19521953    super(parent, style | SWT.V_SCROLL | SWT.H_SCROLL); 
    1953     Stdout.formatln( "{} {}", __FILE__, __LINE__ ); 
    19541954     
    19551955    if(handle !is 0) { 
    19561956        directFunction = getDirectFunction(); 
    19571957        directPointer = getDirectPointer(); 
    1958     Stdout.formatln( "{} {}", __FILE__, __LINE__ ); 
    19591958         
    19601959        // increase the instance count 
     
    19681967                        } 
    19691968                    }); 
    1970     Stdout.formatln( "{} {}", __FILE__, __LINE__ ); 
    19711969         
    19721970        // when the display disposed, check the instance count  
     
    19831981        } 
    19841982 
    1985     Stdout.formatln( "{} {}", __FILE__, __LINE__ ); 
    19861983} 
    19871984 
     
    19941991static int handleOfDLL() { return cast(int)_handleOfDLL; } 
    19951992 
    1996 public int callWindowProc( int msg, int wParam, int lParam ){ 
     1993public override int callWindowProc( int hwnd, int msg, int wParam, int lParam ){ 
    19971994    if (handle is 0 ) return 0; 
    19981995    return OS.CallWindowProc( ScintillaProc, handle, msg, wParam, lParam); 
     
    20122009} 
    20132010 
    2014 int windowProc2 () { 
    2015     return ScintillaProc; 
    2016 
    2017  
    2018 int widgetStyle () { 
     2011override int widgetStyle () { 
    20192012    int bits = super.widgetStyle (); 
    20202013    bits |= OS.WS_TABSTOP;