Questions tagged [private-methods]
285 questions
0
votes
1 answer
RE-show previous Userform
i have a series of userforms that will run in sequence, and i need a button that can RE-show the previous userform, i've tried the code below but it gives a error telling me that this userform has already been show, i'm clueless about how to get…

Ygor Yansz
- 176
- 1
- 4
- 12
0
votes
1 answer
Run excel macro when cutcopymode is set to true
I have a problem, I need a specific macro to run, whenever the cutcopymode is turned on, I mean I'll select some cells, and when I press Ctrl+c or Ctrl+x the macro test1 must run, I've tried this but nothing happens.
Private Sub…

Ygor Yansz
- 176
- 1
- 4
- 12
0
votes
1 answer
run a macro to change a cell after a value update
i'm clueless, i'm trying to build a code that input a prefix to a cell value after i change that cell, i mean i'll select a cell and input "342" for example, after i update that value i want the private sub to change that cell value to "GO-342",…

Ygor Yansz
- 176
- 1
- 4
- 12
0
votes
1 answer
Run macro if any cell in a non-contiguous range are changed
i have a non-contiguous range and i need to run a privatesub, if any of this cells change, but only if all cells in this range aren't empty i've tried this but isn't working, since it's running the macro iven if the cells are empty, here:
Private…

Ygor Yansz
- 176
- 1
- 4
- 12
0
votes
1 answer
How to access private class methods in Rails
I have a class Initialization.
I have a method send_mail which is a class method
def self.send_mail
a = user_stats
end
user_stats is a private method and when I try to call this method, it throws an error
class << self
private
def…

Suganya
- 701
- 1
- 9
- 27
0
votes
4 answers
setTimeout for a function of a private object
I'm trying to set timeout to a function of an object, which is a private function of another object. Actually the structure is something like this:
function MainObject() {
var id;
...
var InnerObject = function() {
…

Phialco
- 13
- 3
0
votes
2 answers
The value of some fields is not used when i add private method
I'm new at Java and I'm attempting on my very first coding, but i hit a bump as in if i type private before data types it will say
The value of the field Teacher.tea_id is not used
The value of the field Teacher.name is not used
Nevertheless, if i…

Vivi Xu
- 131
- 2
- 5
- 12
0
votes
1 answer
How do you run private subs from a module?
I want to make a public sub in my module to to store a repeating procedure. Specifically key press events.
Private Sub txtPass_KeyPress(sender As Object, e As KeyPressEventArgs) _
Handles txtPass.KeyPress
FunctionKeys(Me, sender, e)
End…

YinYangKim
- 31
- 3
- 12
0
votes
1 answer
No viewDidLoad method in PSListController
I have checked recent header files for PSListController , PSViewController and PSBaseView, but there is no method for acknowledgement of view creation, like iOS has viewDidLoad - Although there are many methods available for view Display. One I…

NightFury
- 13,436
- 6
- 71
- 120
0
votes
3 answers
Accessing a private method in javascript
The following is my javascript code for accessing a private method. But it is not working. I receive a TypeError: string is not a function message. Can anyone please help me?
Here is my code:
function Boy(firstName,lastName) {
this.fisrtName =…

Ramvignesh
- 210
- 6
- 16
0
votes
1 answer
Return in method that called private method
In an attempt to have smaller methods, I'm moving some parts out of a method into smaller private methods. In one private method, however, I'm doing some error handling and would like to break out of the method that called the private method, not…

Owen Sims
- 373
- 3
- 7
0
votes
3 answers
Access Modifier in Ruby
I can't understand this behavior. Please point me to a detailed answer. I created an object of class Parent:
class Parent
private
def name
'Mommy'
end
end
p = Parent.new
This raises an error:
p.name
# => NoMethodError: private method…

user3493806
- 23
- 3
0
votes
2 answers
difference between protected and private
I'm wondering about difference between private and protected in Ruby, there are many sources out there, but they are usually only telling me that private methods cannot be inherited, but in many different ways.
class Person
private
def hello
…

Leo
- 2,061
- 4
- 30
- 58
0
votes
0 answers
UITextView variable, allow to set text using special method only?
I have a UITextField property inside a UIViewController class. I want to allow to set its text using a special method in view controller only. The goal is to move other view controller's elements according to a size of a text inside the text…

user2083364
- 744
- 1
- 7
- 20
0
votes
1 answer
Invoking private method issue
I've implemented algorithm for counting array inversions (which also merge-sots the array) but in order to make it more neat I want to didide sorting and counting outputs.
Method *count_and_sort* returns array [ number_of_inversions, [sorted_array]…

Konstantin
- 55
- 10