Skip to content

Commit

Permalink
added ui updates to delete, close and ID-textfield
Browse files Browse the repository at this point in the history
  • Loading branch information
Ingmar Vogel committed Jun 18, 2024
1 parent 49bdffb commit b2f15b2
Show file tree
Hide file tree
Showing 16 changed files with 72 additions and 67 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
accessing
at: key ifPresent: do ifAbsentPut: anObject

self items at: key ifPresent: [:arg | do value] ifAbsentPut: (STON fromString: (STON toString: anObject))
self items at: key ifPresent: [:arg | do value] ifAbsentPut: (STON fromString: (STON toString: anObject)).
self changed: #pollList
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
initialize-release
removeKey: key

self items removeKey: key ifAbsent: [self error]
self items removeKey: key ifAbsent: [self error].
self changed: #pollList
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"addAnswerSet:ToPoll:" : "JT 8/2/2022 18:06",
"at:" : "kge 8/1/2022 18:55",
"at:ifAbsent:" : "kge 8/1/2022 18:55",
"at:ifPresent:ifAbsentPut:" : "kge 8/1/2022 18:55",
"at:ifPresent:ifAbsentPut:" : "Ingmar Vogel 6/18/2024 10:14",
"groupAt:" : "ms 8/4/2022 21:56",
"includesKey:" : "kge 8/1/2022 18:56",
"initialize" : "kge 8/1/2022 18:56",
"items" : "JT 8/2/2022 18:06",
"items:" : "JT 8/2/2022 18:06",
"removeKey:" : "kge 8/1/2022 18:56",
"removeKey:" : "Ingmar Vogel 6/18/2024 10:14",
"values" : "kge 8/1/2022 18:56" } }
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ self currentPoll == 0 ifFalse: [
closeWithPassword: (LQPasswordManager default
findPasswordFor: self currentPollID
ifAbsent: [^ UIManager default inform: 'You don''t have access to this poll.']).

self changed: #pollId
]
"self dependents first label: 'closed Poll with ID:'."
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
modifying
copyPollId

currentPoll == 0 ifFalse:[
Clipboard clipboardText: (self currentPollID asText).
"Interacting with clipboard takes a bit of time otherwise we get faulty results when quickly accessing the Clipboard afterwards"
(Delay forSeconds: self clipboardDelay) wait]
currentPoll == 0
ifFalse: [Clipboard clipboardText: self currentPollID asText.
"Interacting with clipboard takes a bit of time
otherwise we get faulty results when quickly
accessing the Clipboard afterwards"
(Delay forSeconds: self clipboardDelay) wait]

Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
modifying
createPoll

| givenPollTitle |
givenPollTitle := UIManager default request: 'Enter a title for your poll'.
(givenPollTitle = '') ifTrue: [^ self].
ToolBuilder open: (LQPollDraftBuilder newWithTitle: givenPollTitle)
givenPollTitle = ''
ifTrue: [^ self].
ToolBuilder
open: (LQPollDraftBuilder newWithTitle: givenPollTitle)

Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
accessing
currentPollID
self pollList size == 0 ifFalse: [
^ (self pollList at: self getIndex) id]
self pollList size == 0
ifFalse: [^ (self pollList at: self getIndex) id].

^ 'No polls in your repo.'
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
modifying
deletePoll

self currentPoll == 0 ifFalse: [
(LQRemotePollRepoServer pollRepo at: self currentPollID
ifAbsent:
[^ 'Already deleted.']).
LQRemotePollRepoServer pollRepo removeKey: self currentPollID
]

self currentPoll == 0
ifFalse: [LQRemotePollRepoServer pollRepo
at: self currentPollID
ifAbsent: [^ 'This poll does not exist.'].
LQRemotePollRepoServer pollRepo removeKey: self currentPollID.
self setIndex: self pollList size.
self changed: #pollList]
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
modifying
exportResults

self currentPoll == 0 ifFalse: [
(LQRemotePollRepoServer pollRepo at: self currentPollID
ifAbsent:
[^ 'This poll does not exist.'])
exportCSV
]
self currentPoll == 0
ifFalse: [LQRemotePollRepoServer pollRepo
at: self currentPollID
ifAbsent: [^ 'This poll does not exist.'].
(LQRemotePollRepoServer pollRepo at: self currentPollID) exportCSV]
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@ initialize-release
initialize
super initialize.
self visualizations: OrderedCollection new.
self pollList: self refreshPollList.
self currentPoll: 1.
"self
pollList: (self convertDictionaryToOrderedCollection: LQRemotePollRepoServer pollRepo)"
self currentPoll: self pollList size.
LQRemotePollRepoServer pollRepo addDependent: self
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ pollId

((self currentPoll == 0) and: [self pollList size == 0])
ifFalse:
[^ self currentPollID asString].
^ 'No poll selected!'
[(LQRemotePollRepoServer pollRepo at: self currentPollID) isOpen
ifFalse: [^'Poll closed!'].
^ self currentPollID asString].
^ 'No polls in your repo!'
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
accessing
pollList
^ pollList
" LQRemotePollRepoServer pollRepo items size == 0
ifTrue: [^OrderedCollection new]."
^ LQRemotePollRepoServer pollRepo items values asOrderedCollection
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
modifying
setIndex: index

setIndex: index
self currentPoll: index.
index=0 ifFalse: [self changed: #pollID].
self changed: #getIndex

"index = 0
ifFalse: [self changed: #pollID]."
self changed: #pollId.
self changed: #getIndex
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
modifying
visualizeResults

| pollNameInput foundPoll |
currentPoll == 0 ifFalse:[
pollNameInput := UIManager default request: 'Enter Poll ID'.
pollNameInput ifEmpty: [^ self].
foundPoll := LQRemotePollRepoServer pollRepo at: pollNameInput
ifAbsent: [^ UIManager default inform: 'This poll does not exist.'].
LQVisualizationControls openOn: foundPoll]
"| pollNameInput foundPoll |
currentPoll == 0
ifFalse: [pollNameInput := UIManager default request: 'Enter Poll ID'.
pollNameInput
ifEmpty: [^ self].
foundPoll := LQRemotePollRepoServer pollRepo
at: pollNameInput
ifAbsent: [^ UIManager default inform: 'This poll does not exist.'].
LQVisualizationControls openOn: foundPoll]"
Original file line number Diff line number Diff line change
Expand Up @@ -10,41 +10,39 @@
"buildExportResultsButtonWith:" : "Ingmar Vogel 6/7/2024 11:30",
"buildIDTextBoxWith:" : "Ingmar Vogel 6/8/2024 14:30",
"buildIdCopyButtonWith:" : "Ingmar Vogel 6/7/2024 11:30",
"buildPollListWith:" : "Ingmar Vogel 6/7/2024 17:20",
"buildPollListWith:" : "Ingmar Vogel 6/18/2024 10:18",
"buildQuestionBuilder" : "bn 8/2/2022 16:57",
"buildStopServerButtonWith:" : "Ingmar Vogel 6/7/2024 11:30",
"buildWith:" : "Ingmar Vogel 6/8/2024 14:31",
"buildWith:" : "Ingmar Vogel 6/18/2024 10:00",
"clipboardDelay" : "Ingmar Vogel 6/5/2024 15:03",
"closePoll" : "Ingmar Vogel 6/8/2024 14:50",
"closePoll" : "Ingmar Vogel 6/18/2024 09:43",
"closePollButtonFrame" : "Ingmar Vogel 6/7/2024 11:32",
"copyPollId" : "Ingmar Vogel 6/8/2024 14:51",
"copyPollId" : "Ingmar Vogel 6/8/2024 15:21",
"createAnotherPollButtonFrame" : "Ingmar Vogel 6/7/2024 11:32",
"createPoll" : "Ingmar Vogel 6/8/2024 15:06",
"createPoll" : "Ingmar Vogel 6/8/2024 15:22",
"createPollFromSavedPollsButtonFrame" : "Ingmar Vogel 6/7/2024 11:36",
"currentPoll" : "Ingmar Vogel 6/5/2024 13:28",
"currentPoll:" : "Ingmar Vogel 6/5/2024 13:28",
"currentPollID" : "Ingmar Vogel 6/8/2024 15:04",
"deletePoll" : "Ingmar Vogel 6/8/2024 14:54",
"currentPollID" : "Ingmar Vogel 6/8/2024 15:31",
"deletePoll" : "Ingmar Vogel 6/18/2024 09:34",
"deletePollButtonFrame" : "Ingmar Vogel 6/8/2024 14:12",
"exportResults" : "Ingmar Vogel 6/8/2024 14:57",
"exportResults" : "Ingmar Vogel 6/8/2024 15:26",
"exportResultsButtonFrame" : "Ingmar Vogel 6/7/2024 11:32",
"frame:fromTop:fromLeft:width:" : "bn 8/2/2022 16:58",
"generateRandomID" : "JT 6/23/2022 19:34",
"getIndex" : "Ingmar Vogel 6/5/2024 13:28",
"idCopyButtonFrame" : "Ingmar Vogel 6/8/2024 14:37",
"idTextBoxFrameFrame" : "Ingmar Vogel 6/8/2024 14:37",
"initialize" : "Ingmar Vogel 6/8/2024 14:47",
"pollId" : "Ingmar Vogel 6/8/2024 15:01",
"pollList" : "Ingmar Vogel 6/5/2024 14:14",
"pollList:" : "Ingmar Vogel 6/5/2024 14:15",
"initialize" : "Ingmar Vogel 6/18/2024 10:00",
"pollId" : "Ingmar Vogel 6/18/2024 11:10",
"pollList" : "Ingmar Vogel 6/18/2024 09:58",
"pollListFrame" : "Ingmar Vogel 6/7/2024 17:20",
"questionBuilderFrame" : "bn 8/2/2022 16:59",
"refreshPollList" : "Ingmar Vogel 6/8/2024 14:21",
"removeVisualizationAt:" : "Ingmar Vogel 6/5/2024 13:30",
"setIndex:" : "Ingmar Vogel 6/8/2024 15:15",
"setIndex:" : "Ingmar Vogel 6/18/2024 09:15",
"stopServer" : "Ingmar Vogel 6/5/2024 13:36",
"stopServerButtonFrame" : "Ingmar Vogel 6/7/2024 11:34",
"visualizationAt:" : "Ingmar Vogel 6/5/2024 13:29",
"visualizations" : "Ingmar Vogel 6/5/2024 13:29",
"visualizations:" : "Ingmar Vogel 6/5/2024 13:29",
"visualizeResults" : "Ingmar Vogel 6/7/2024 17:28" } }
"visualizeResults" : "Ingmar Vogel 6/8/2024 15:30" } }
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"commentStamp" : "<historical>",
"instvars" : [
"currentPoll",
"visualizations",
"pollList" ],
"visualizations" ],
"name" : "LQHostMenuNew",
"pools" : [
],
Expand Down

0 comments on commit b2f15b2

Please sign in to comment.