| Hallo, Gast |
Du musst dich registrieren bevor du auf unserer Seite Beiträge schreiben kannst.
|
| Foren-Statistiken |
» Mitglieder: 139
» Neuestes Mitglied: matu75
» Foren-Themen: 298
» Foren-Beiträge: 2.646
Komplettstatistiken
|
| Benutzer Online |
Momentan sind 97 Benutzer online » 0 Mitglieder » 95 Gäste Bing, Google
|
| Aktive Themen |
Die Zunft
Forum: Showcase
Letzter Beitrag: xp^tsa
Gestern, 20:08
» Antworten: 3
» Ansichten: 439
|
smal aga intro
Forum: Snippets & Libraries
Letzter Beitrag: xp^tsa
20.01.2026, 22:41
» Antworten: 0
» Ansichten: 146
|
problem mit datei operati...
Forum: Questions & Answers
Letzter Beitrag: hackball
18.01.2026, 11:58
» Antworten: 3
» Ansichten: 450
|
AmiBlitz3: Amiga 40 Editi...
Forum: News
Letzter Beitrag: xp^tsa
17.01.2026, 02:51
» Antworten: 1
» Ansichten: 949
|
for - next block too long
Forum: Questions & Answers
Letzter Beitrag: xp^tsa
17.01.2026, 01:18
» Antworten: 2
» Ansichten: 505
|
Text hintergrund transpar...
Forum: Questions & Answers
Letzter Beitrag: xp^tsa
03.01.2026, 01:44
» Antworten: 2
» Ansichten: 779
|
screen hintergrund
Forum: Questions & Answers
Letzter Beitrag: xp^tsa
31.12.2025, 04:32
» Antworten: 2
» Ansichten: 793
|
Schöne Weihnachten und gu...
Forum: Off Topic
Letzter Beitrag: xp^tsa
27.12.2025, 20:26
» Antworten: 23
» Ansichten: 76.589
|
RedPill - Game Constructi...
Forum: Projects
Letzter Beitrag: HelmutH
06.12.2025, 14:04
» Antworten: 46
» Ansichten: 149.045
|
North Engine 2
Forum: Projects
Letzter Beitrag: HelmutH
09.11.2025, 14:16
» Antworten: 14
» Ansichten: 7.048
|
|
|
| Amiblitz3 Ped: Sourceänderungen verschwinden |
|
Geschrieben von: Blackbird - 28.12.2013, 19:03 - Forum: AB³ Development
- Antworten (5)
|
 |
Hallo Jungs,
Ich weis das der Ped nicht allen liegt, und vieleicht auch etliche User schon auf AIDE schielen werden,
aber mir ist da wieder was aufgefallen...
Und zwar verschwinden Änderungen am Source wenn man mit der Maus weg scrollt...
Das passiert aber nur, wenn man davor nicht mit dem Cursor eine Zeile nach unten/oben verrutscht...
Hoffe ihr könnt das nachstellen..
|
|
|
| Syntax Highlightning in tuiTextBox |
|
Geschrieben von: Der Wanderer - 01.12.2013, 20:37 - Forum: NTUI
- Antworten (11)
|
 |
Syntax Highlightning (or any other formatting of the text) in NTUI is called "styling".
This is how it works for now (Function names will change slightly in final NTUI), since don't want to expose newtypes.
[ab3]myStyleCallback:
Function.l myStyleCallback{*textBox.tuiTextBox,lpos.l,*tline.tline}
*tline\sclength = 0 ; reset the style information
cpos.l = 0 ; start at character position 0
While cpos<*tline\clength ; go through the whole line
c.b = Peek.b(*tline\text+cpos) : cpos+1 ; grab a character
Select c
Case @"a" ; if we see an "a"...
; make it bold and red
_tb_SetStyleCommand{*tline,cpos-1,#TUITBSC_BOLD,1}
_tb_SetStyleCommand{*tline,cpos-1,#TUITBSC_FGPEN,#TUITBPEN_RED}
; and return to normal
_tb_SetStyleCommand{*tline,cpos,#TUITBSC_BOLD,0}
_tb_SetStyleCommand{*tline,cpos,#TUITBSC_FGPEN,#TUITBPEN_TEXT}
Default
; nothing happens for other characters
End Select
Wend
*tline\flags|#TUITBLF_STYLED ; mark the line as styled
Function Return #TUISCB_DONE ; tell NTUI we are done
End Function
; this creates a global variable "*myStyleCallback" that points to our functions
; and tells AmiBlitz3 not to remove the function, since it is never called directly
!_MakeGlobalFuncPointer{myStyleCallback,{Null,0,Null}}
...
ntui_SetAttr{*textBox,#TUITBA_STYLECB,*myStyleCallback} ; attach the callback function to the textbox
...
ntui_SetAttr{*textBox,#TUITBA_STYLECB,Null} ; remove the callback function from the textbox[/ab3]
There are a few things to mention:
1. The example makes all "a"'s in the text bold and red.
2. You don't have to remove the callback when you free the textBox. This is only necessary if you want to make sure it will never called again, e.g. if your style callback allocated resources that you want to free before NTUI.
3. Between the label "myStyleCallback:" and the function declaration MUST NOT be any code.
4. It is allowed to write to the text buffer (Poke), but the length MUST be preserved. E.g. Casing can be altered. Note that you are actually changing the text buffer. If you just want to just format for display, you need "Style Commands" for this.
5. There are many "Style Commands", not only bold and colors. See TUITBSC_... for more. New commands can be easily added if necessary.
6. To style the text, you don't need a StyleCallback. You can also go through the whole text and style it. However, the style callback has so many advantages that you really want to use it. E.g., you don't need to parse the whole text, only the visible lines (=much faster). It also keeps track while editing the text line.
7. If you parse a line and the result may affect the next or previous line (e.g. multi-line comment), you need to return #TUISCB_NEXT or #TUISCB_PREV instead of #TUISCB_DONE. You can store the parser state as flags in *tline\flags. There are currently two flags, #TUITBLF_INCOMMENT and #TUITBLF_INTAG.
8. If the highlightning is more complex that just tracking a character, I highly recommend using a stack-based parser rather than a state machine.
99% of all programming languages can be parsed by a stack based parser with lookahead of 1 or 2 characters. I can give an example if there is interest.
|
|
|
| Erzeugen von Labels (zum wiederfinden) |
|
Geschrieben von: hackball - 01.12.2013, 01:42 - Forum: Questions & Answers
- Antworten (9)
|
 |
Ich möchte in AB3 Labels erzeugen, die mir ermöglichen, an bestimmte Stellen zu springen. Im Optimalfall würde ich immer das gleiche benutzen, nämlich das Tape .o__o
Da man natürlich nicht mehrmals dasselbe Label verwenden kann, muß ich mein Tape immer etwas abwandeln.
Gibt es für diesen Fall eine elegantere Lösung?
edit
Hm. z.B. eine Direktive "Dummylabel = .o__o" oder so?
|
|
|
| Ntui: Engine |
|
Geschrieben von: Blackbird - 30.11.2013, 16:47 - Forum: NTUI
- Antworten (15)
|
 |
Hallo Thilo,
Wird denn bei der angabe im xml seit neuesten kein iconifygadget mehr im Window erzeugt, oder ging das noch nie ?
In AIDE machst du das ja per Menü...
|
|
|
|