Skip to content

Commit

Permalink
remove unneccessary code; update version info
Browse files Browse the repository at this point in the history
  • Loading branch information
xulihang committed Jan 21, 2021
1 parent 3d33abc commit 25573a0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion BasicCAT/BasicCAT.b4j
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ Sub MenuBar1_Action
Case "_About"
Dim version As String
version=File.ReadString(File.DirAssets,"version.txt")
fx.Msgbox(MainForm,"BasicCAT "&version&CRLF&"@xulihang 2020","BasicCAT")
fx.Msgbox(MainForm,"BasicCAT "&version&CRLF&"@xulihang 2021","BasicCAT")
End Select
End Sub

Expand Down
2 changes: 1 addition & 1 deletion BasicCAT/BasicCAT.b4j.meta
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,6 @@ ModuleClosedNodes8=
ModuleClosedNodes80=
ModuleClosedNodes81=
ModuleClosedNodes9=
NavigationStack=RichTextArea,BaseResized_Event,217,0,Main,dividerPosition_changed,1711,0,Main,lbl_MouseClicked,1737,0,RichTextArea,setAutoHeight,525,0,RichTextArea,totalHeight,533,0,RichTextArea,AreaHeight,526,6,RichTextArea,mi_Action,725,0,RichTextArea,DesignerCreateView,123,0,RichTextArea,Base_MouseClicked,220,0,Main,ListViewParent_Resize,1272,6,Project,targetTextArea_TextChanged,1029,1
NavigationStack=RichTextArea,Initialize,44,0,RichTextArea,SetObject,513,0,RichTextArea,LineHeight,514,0,RichTextArea,setFontFamily,542,0,RichTextArea,setFontSzie,555,0,RichTextArea,Scroll_Filter,635,0,RichTextArea,TextChanged_Event,560,0,RichTextArea,totalHeight,531,0,RichTextArea,AreaHeight,529,0,RichTextArea,addContextMenu,677,0,Main,MenuBar1_Action,455,0
SelectedBuild=0
VisibleModules=1,2,3,4,5,6,7,8,9,10,13
2 changes: 1 addition & 1 deletion BasicCAT/Files/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.9.7
1.9.8
10 changes: 3 additions & 7 deletions BasicCAT/RichTextArea.bas
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ Public Sub DesignerCreateView(Base As Pane, Lbl As Label, Props As Map)
'Add an eventlistener to the ReadOnlyObjectProperty "layoutBoundsProperty" on the Base Pane so that we can change the internal layout to fit
Dim Event As Object = JO.CreateEvent("javafx.beans.value.ChangeListener","BaseResized","")
mBaseJO.RunMethodJO("layoutBoundsProperty",Null).RunMethod("addListener",Array(Event))
'Dim Event As Object = JO.CreateEvent("javafx.beans.value.ChangeListener","BaseClicked","")
'mBaseJO.RunMethodJO("onMouseClickedProperty",Null).RunMethod("addListener",Array(Event))

Dim O As Object = JO.CreateEventFromUI("javafx.event.EventHandler","KeyPressed",Null)
JO.RunMethod("setOnKeyPressed",Array(O))
JO.RunMethod("setFocusTraversable",Array(True))
Expand Down Expand Up @@ -217,13 +216,11 @@ Private Sub BaseResized_Event(MethodName As String,Args() As Object) As Object
CustomViewNode.PrefHeight = mBase.Height-2*offset
End If
End If

'Make any changes needed to other integral nodes
UpdateLayout
End Sub

Sub Base_MouseClicked (EventData As MouseEvent)
Log("clicked")
RequestFocus
End Sub

Expand Down Expand Up @@ -544,7 +541,7 @@ Public Sub totalHeight As Double
height=Max(height,Utils.MeasureMultilineTextHeight(Font,mBase.Width-2*offset-20,getText))
height=height+Max(mLineHeightTimes,1.5)*LineHeight(20)
Else
Return JO.RunMethod("getHeight",Null)+2*offset
Return AreaHeight+2*offset
End If
Return height
End Sub
Expand All @@ -567,7 +564,6 @@ End Sub
Sub TextChanged_Event(MethodName As String,Args() As Object) As ResumableSub 'ignore
updateStyleSpans
'Sleep(50)
'Dim AreaHeight As Double=JO.RunMethod("getHeight",Null)
'mBase.SetSize(mBase.Width,AreaHeight+2*offset)
If SubExists(mCallBack,mEventName & "_TextChanged") Then
CallSubDelayed3(mCallBack,mEventName & "_TextChanged",Args(1),Args(2))
Expand Down Expand Up @@ -642,7 +638,7 @@ Sub ComputeHighlightingB4x(str As String) As JavaObject
End Sub

Sub Scroll_Filter (EventData As Event)
If mBase.Height>JO.RunMethod("getHeight",Null)-2*offset Then
If mBase.Height>AreaHeight-2*offset Then
Dim e As JavaObject = EventData
Dim Parent As Node
Parent=mBase.Parent
Expand Down

0 comments on commit 25573a0

Please sign in to comment.